From 2b4f427f5a36f63e26b026da056c5ea17688cc0e Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 3 Oct 2024 00:31:27 +0000 Subject: [PATCH 1/2] Prepare for upcoming change to `include` Prepares for https://github.com/JuliaLang/julia/pull/55949. --- src/lowered.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lowered.jl b/src/lowered.jl index 1533213c..e0de9e2e 100644 --- a/src/lowered.jl +++ b/src/lowered.jl @@ -33,6 +33,9 @@ function is_some_include(@nospecialize(f)) f = f.value end if isa(f, Function) + if isdefined(Base, :IncludeInto) && isa(f, Base.IncludeInto) + return true + end mod = Base.typename(typeof(f)).module return isdefined(mod, :include) && f === (@isdefined(getglobal) ? getglobal(mod, :include) : getfield(mod, :include)) end From 7c0df6ef83e9a0bf1877cf99e43758422c7e0824 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 3 Oct 2024 10:47:29 -0400 Subject: [PATCH 2/2] Update src/lowered.jl Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> --- src/lowered.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lowered.jl b/src/lowered.jl index e0de9e2e..bbf78eeb 100644 --- a/src/lowered.jl +++ b/src/lowered.jl @@ -33,7 +33,7 @@ function is_some_include(@nospecialize(f)) f = f.value end if isa(f, Function) - if isdefined(Base, :IncludeInto) && isa(f, Base.IncludeInto) + if @static isdefined(Base, :IncludeInto) && isa(f, Base.IncludeInto) return true end mod = Base.typename(typeof(f)).module