Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/macroexpand.scm
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@
(body (cadr e))
(m (caddr e))
(lno (cdddr e)))
(resolve-expansion-vars-with-new-env body env m lno parent-scope inarg #t)))
(resolve-expansion-vars-with-new-env body '() m lno parent-scope inarg #t)))
((tuple)
(cons (car e)
(map (lambda (x)
Expand Down
25 changes: 25 additions & 0 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2280,6 +2280,31 @@ end
x6074 = 6074
@test @X6074() == 6074

# issues #48910, 54417
macro X43151_nested()
quote my_value = "from_nested_macro" end
end
macro X43151_parent()
quote
my_value = "from_parent_macro"
@X43151_nested()
my_value
end
end
@test @X43151_parent() == "from_parent_macro"

macro X43151_nested_escaping()
quote $(esc(:my_value)) = "from_nested_macro" end
end
macro X43151_parent_escaping()
quote
my_value = "from_parent_macro"
@X43151_nested_escaping()
my_value
end
end
@test @X43151_parent_escaping() == "from_nested_macro"

# issue #5536
test5536(a::Union{Real, AbstractArray}...) = "Splatting"
test5536(a::Union{Real, AbstractArray}) = "Non-splatting"
Expand Down