Skip to content

Commit 81051d4

Browse files
author
Alessandro
committed
fix similarterm
1 parent 7c280d0 commit 81051d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/expr.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ function similarterm(x::Type{Expr}, head, args, symtype=nothing; metadata=nothin
1919
expr_similarterm(head, args, Val{exprhead}())
2020
end
2121

22+
function similarterm(x::Expr, head, args, symtype=nothing; metadata=nothing, exprhead=exprhead(x))
23+
expr_similarterm(head, args, Val{exprhead}())
24+
end
25+
26+
2227
expr_similarterm(head, args, ::Val{:call}) = Expr(:call, head, args...)
2328
expr_similarterm(head, args, ::Val{:macrocall}) = Expr(:macrocall, head, args...) # discard linenumbernodes?
2429
expr_similarterm(head, args, ::Val{eh}) where {eh} = Expr(eh, args...)

0 commit comments

Comments
 (0)