diff --git a/.github/workflows/Testing.yaml b/.github/workflows/Testing.yaml index 48d03b6..224c879 100644 --- a/.github/workflows/Testing.yaml +++ b/.github/workflows/Testing.yaml @@ -13,6 +13,7 @@ jobs: version: - '1.7' - '1' + - '1.11.1' - 'nightly' os: - ubuntu-latest diff --git a/src/Libtask.jl b/src/Libtask.jl index 6f6985c..f31f37b 100644 --- a/src/Libtask.jl +++ b/src/Libtask.jl @@ -11,7 +11,11 @@ export TArray, tzeros, tfill, TRef # legacy types back compat const TypedSlot = @static if isdefined(Core, :TypedSlot) # Julia v1.10 removed Core.TypedSlot Core.TypedSlot else - Core.Compiler.TypedSlot + if isdefined(Core.Compiler, :TypedSlot) # Julia 1.11 removed Core.Compiler.TypedSlot + Core.Compiler.TypedSlot + else + Any + end end include("tapedfunction.jl") diff --git a/src/tapedfunction.jl b/src/tapedfunction.jl index e5eeef2..e36e650 100644 --- a/src/tapedfunction.jl +++ b/src/tapedfunction.jl @@ -285,9 +285,11 @@ function bind_var!(var::QuoteNode, bindings::Bindings, ir::Core.CodeInfo) LOGGING[] && @info "evaluating QuoteNode $var at compile time" bind_var!(eval(var), bindings, ir) end -function bind_var!(var::TypedSlot, bindings::Bindings, ir::Core.CodeInfo) - # turn TypedSlot to SlotNumber - bind_var!(Core.SlotNumber(var.id), bindings, ir) +@static if TypedSlot !== Any + function bind_var!(var::TypedSlot, bindings::Bindings, ir::Core.CodeInfo) + # turn TypedSlot to SlotNumber + bind_var!(Core.SlotNumber(var.id), bindings, ir) + end end function bind_var!(var::Core.SlotNumber, bindings::Bindings, ir::Core.CodeInfo) get!(bindings[1], var, allocate_binding!(var, bindings, ir.slottypes[var.id]))