Skip to content

Commit 45a79a7

Browse files
Merge pull request #4067 from ChrisRackauckas-Claude/fix/julia-1.10-ispublic-compat
fix: add Julia 1.10 compatibility for Base.ispublic
2 parents afa83fd + e68c0e7 commit 45a79a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ModelingToolkit.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,11 @@ macro import_mtkbase()
112112
name in banned_names && continue
113113
startswith(string(name), '#') && continue
114114
push!(inner_using_expr.args, Expr(:., name))
115-
if Base.ispublic(MTKBase, name) && !Base.isexported(MTKBase, name)
116-
push!(inner_public_expr.args, name)
115+
# Base.ispublic was added in Julia 1.11
116+
@static if VERSION >= v"1.11"
117+
if Base.ispublic(MTKBase, name) && !Base.isexported(MTKBase, name)
118+
push!(inner_public_expr.args, name)
119+
end
117120
end
118121
end
119122

0 commit comments

Comments
 (0)