diff --git a/src/register.jl b/src/register.jl index 9fc28218d..547086eee 100644 --- a/src/register.jl +++ b/src/register.jl @@ -29,7 +29,7 @@ macro register_symbolic(expr, define_promotion = true, Ts = :([])) args′ = map((a, T) -> :($a::$T), argnames, Ts) ret_type = isnothing(ret_type) ? Real : ret_type - fexpr = :(@wrapped function $f($(args′...)) + fexpr = :(Symbolics.@wrapped function $f($(args′...)) args = [$(argnames...),] unwrapped_args = map($unwrap, args) res = if !any(x->$issym(x) || $istree(x), unwrapped_args) diff --git a/src/wrapper-types.jl b/src/wrapper-types.jl index e5b1bb0fe..0532c3a24 100644 --- a/src/wrapper-types.jl +++ b/src/wrapper-types.jl @@ -111,8 +111,8 @@ function wrap_func_expr(mod, expr) # expected to be defined outside Symbolics if arg isa Expr && arg.head == :(::) T = Base.eval(mod, arg.args[2]) - has_symwrapper(T) ? (T, :(SymbolicUtils.Symbolic{<:$T}), wrapper_type(T)) : - (T,:(SymbolicUtils.Symbolic{<:$T})) + has_symwrapper(T) ? (T, :(Symbolics.SymbolicUtils.Symbolic{<:$T}), wrapper_type(T)) : + (T,:(Symbolics.SymbolicUtils.Symbolic{<:$T})) elseif arg isa Expr && arg.head == :(...) Ts = type_options(arg.args[1]) map(x->Vararg{x},Ts) diff --git a/test/registration_without_using.jl b/test/registration_without_using.jl new file mode 100644 index 000000000..ee7a0d608 --- /dev/null +++ b/test/registration_without_using.jl @@ -0,0 +1,2 @@ +using StaticArrays, DiffEqBase +import Symbolics;Symbolics.@register_symbolic foo(x, y) diff --git a/test/runtests.jl b/test/runtests.jl index 27d013a61..b11dab166 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -45,6 +45,7 @@ if GROUP == "All" || GROUP == "Core" @safetestset "Integral Test" begin include("integral.jl") end @safetestset "CartesianIndex Test" begin include("cartesianindex.jl") end @safetestset "LogExpFunctions Test" begin include("logexpfunctions.jl") end + @safetestset "Registration without using Test" begin include("registration_without_using.jl") end end if GROUP == "All" || GROUP == "Core" || GROUP == "SymbolicIndexingInterface"