Skip to content

Commit 82ed37c

Browse files
committed
remove similarterm
1 parent 17f4081 commit 82ed37c

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

src/TermInterface.jl

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -117,35 +117,6 @@ function metadata(x, data)
117117
error("Setting metadata on $x is not implemented")
118118
end
119119

120-
"""
121-
similarterm(x, op, args, symtype=nothing; metadata=nothing)
122-
123-
"""
124-
function similarterm(x, op, args, symtype=nothing; metadata=nothing)
125-
Base.depwarn("""`similarterm` is deprecated, use `maketerm` instead.
126-
See https://github.com/JuliaSymbolics/TermInterface.jl for details.
127-
The present call can be replaced by
128-
`maketerm(typeof(x), $(head(x)), [op, args...], symtype, metadata)`""", :similarterm)
129-
130-
maketerm(typeof(x), callhead(x), [op, args...], symtype, metadata)
131-
end
132-
133-
# Old fallback
134-
function similarterm(T::Type, op, args, symtype=nothing; metadata=nothing)
135-
Base.depwarn("`similarterm` is deprecated, use `maketerm` instead." *
136-
"See https://github.com/JuliaSymbolics/TermInterface.jl for details.", :similarterm)
137-
op(args...)
138-
end
139-
140-
export similarterm
141-
142-
143-
"""
144-
callhead(x)
145-
Used in this deprecation cycle of `similarterm` to find the `head` argument to
146-
`maketerm`. Do not implement this, or use `similarterm` if you're using this package.
147-
"""
148-
callhead(x) = typeof(x)
149120

150121
"""
151122
maketerm(T, head, children, type, metadata)

test/runtests.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ using Test
88
@test operation(ex) == :f
99
@test arguments(ex) == [:a, :b]
1010
@test iscall(ex)
11-
@test ex == similarterm(ex, :f, [:a, :b])
1211
@test ex == maketerm(Expr, :call, [:f, :a, :b])
1312

1413

0 commit comments

Comments
 (0)