Skip to content

Commit 1bd3220

Browse files
authored
Base.isbindingresolved has been deprecated in Julia 1.12 and usage of a symbol earlier is no longer an issue.
1 parent 28845f1 commit 1bd3220

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/macros.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Redirect default integer math to overflow-checked operators for the current modu
8585
macro default_checked()
8686
quote
8787
if !isdefined(@__MODULE__, :__OverflowContextDefaultSet)
88-
any(Base.isbindingresolved.(Ref(@__MODULE__), op_method_symbols)) &&
88+
VERSION < v"1.12" && any(Base.isbindingresolved.(Ref(@__MODULE__), op_method_symbols)) &&
8989
error("A default context may only be set before any reference to the affected methods (+, -, *, ^, abs) in the target module.")
9090
else
9191
@warn "A previous default was set for this module. Previously defined methods in this module will be recompiled with this new default."
@@ -116,7 +116,7 @@ Restore default integer math to overflow-permissive operators for the current mo
116116
macro default_unchecked()
117117
quote
118118
if !isdefined(@__MODULE__, :__OverflowContextDefaultSet)
119-
any(Base.isbindingresolved.(Ref(@__MODULE__), op_method_symbols)) &&
119+
VERSION < v"1.12" && any(Base.isbindingresolved.(Ref(@__MODULE__), op_method_symbols)) &&
120120
error("A default context may only be set before any reference to the affected methods (+, -, *, ^, abs) in the target module.")
121121
else
122122
@warn "A previous default was set for this module. Previously defined methods in this module will be recompiled with this new default."
@@ -147,7 +147,7 @@ Redirect default integer math to saturating operators for the current module. On
147147
macro default_saturating()
148148
quote
149149
if !isdefined(@__MODULE__, :__OverflowContextDefaultSet)
150-
any(Base.isbindingresolved.(Ref(@__MODULE__), op_method_symbols)) &&
150+
VERSION < v"1.12" && any(Base.isbindingresolved.(Ref(@__MODULE__), op_method_symbols)) &&
151151
error("A default context may only be set before any reference to the affected methods (+, -, *, ^, abs) in the target module.")
152152
else
153153
@warn "A previous default was set for this module. Previously defined methods in this module will be recompiled with this new default."

0 commit comments

Comments
 (0)