Skip to content

Commit

Permalink
test case
Browse files Browse the repository at this point in the history
  • Loading branch information
KDr2 committed Oct 22, 2024
1 parent b18752b commit 7349f36
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Libtask.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export TArray, tzeros, tfill, TRef # legacy types back compat


@static if isdefined(Core, :TypedSlot) || isdefined(Core.Compiler, :TypedSlot)
# Julia v1.10 removed Core.TypedSlot
# Julia v1.10 moved Core.TypedSlot to Core.Compiler
# Julia v1.11 removed Core.Compiler.TypedSlot
const TypedSlot = @static if isdefined(Core, :TypedSlot)
Core.TypedSlot
Expand Down
13 changes: 13 additions & 0 deletions test/issues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,17 @@
r = tf(1, 2)
@test r == (c=3, x=1, y=2)
end

@testset "Issue-Libtask-174, SSAValue=Int and static parameter" begin
# SSAValue = Int
function f()
# this line generates: %1 = 1::Core.Const(1)
r = (a = 1)
return nothing
end
tf = Libtask.TapedFunction(f)
r = tf()
@test r == nothing
end

end

0 comments on commit 7349f36

Please sign in to comment.