Skip to content

Commit

Permalink
fix: conditional import in extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Oct 20, 2023
1 parent 1fe9d57 commit 95e6c1b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ext/SymbolicIndexingInterfaceSymbolicUtilsExt.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
module SymbolicIndexingInterfaceSymbolicUtilsExt

using SymbolicIndexingInterface, SymbolicUtils
using SymbolicIndexingInterface
@static if isdefined(Base, :get_extension)
using SymbolicUtils
else
using ..SymbolicUtils
end

SymbolicIndexingInterface.issymbolic(::Type{<:SymbolicUtils.BasicSymbolic}) = Symbolic()

Expand Down
8 changes: 7 additions & 1 deletion ext/SymbolicIndexingInterfaceSymbolicsExt.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
module SymbolicIndexingInterfaceSymbolicsExt

using SymbolicIndexingInterface, Symbolics
using SymbolicIndexingInterface

@static if isdefined(Base, :get_extension)
using Symbolics
else
using ..Symbolics
end

SymbolicIndexingInterface.issymbolic(::Type{<:Symbolics.Num}) = Symbolic()

Expand Down

0 comments on commit 95e6c1b

Please sign in to comment.