Skip to content

Commit 390687d

Browse files
author
Alessandro
committed
fixed similarterm
1 parent 3012087 commit 390687d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/TermInterface.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ with `head` as the head and `args` as the arguments, `type` as the symtype
8787
and `metadata` as the metadata. By default this will execute `head(args...)`.
8888
`x` parameter can also be a `Type`.
8989
"""
90-
similarterm(x, head, args; type=nothing, metadata=nothing) = head(args...)
90+
similarterm(x, head, args; type=nothing, metadata=nothing) =
91+
similarterm(typeof(x), head, args; type=type, metadata=nothing)
9192
similarterm(x::Type{Expr}, head, args; type=nothing, metadata=nothing) = Expr(head, args...)
9293
function similarterm(x::Type{T}, head::T, args; type=nothing, metadata=nothing) where T
9394
if !isterm(T) head else head(args...) end

0 commit comments

Comments
 (0)