Skip to content

Commit

Permalink
Prepare for upcoming change to include (#854)
Browse files Browse the repository at this point in the history
* Prepare for upcoming change to `include`

Prepares for JuliaLang/julia#55949.

* Update src/lowered.jl

Co-authored-by: Shuhei Kadowaki <[email protected]>

---------

Co-authored-by: Shuhei Kadowaki <[email protected]>
  • Loading branch information
Keno and aviatesk authored Oct 11, 2024
1 parent 3306c02 commit 294d3b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lowered.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ function is_some_include(@nospecialize(f))
f = f.value
end
if isa(f, Function)
if @static 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
Expand Down

0 comments on commit 294d3b9

Please sign in to comment.