Skip to content

Commit 701a99e

Browse files
committed
fix more
1 parent 1ce48db commit 701a99e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

test/interpret.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,10 @@ end
648648
let
649649
# NOTE we need to make sure this code block is compiled, since vecadd is generated function,
650650
# but currently `@interpret` doesn't handle a call to generated functions very well
651-
@static isdefined(Base.Experimental, Symbol("@force_compile")) && Base.Experimental.@force_compile
651+
@static if isdefined(Base, :Experimental) &&
652+
isdefined(Base.Experimental, Symbol("@force_compile"))
653+
Base.Experimental.@force_compile
654+
end
652655
a = (VecElement{Float64}(1.0), VecElement{Float64}(2.0))
653656
@test @interpret(VecTest.vecadd(a, a)) == VecTest.vecadd(a, a)
654657
end

test/limits.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ end
4040
frame = Frame(modexs[5]...)
4141
if VERSION < v"1.4.0-DEV.475"
4242
@test Aborted(frame, 1).at.file == Symbol("util.jl")
43+
elseif isdefined(Base, :Experimental) &&
44+
isdefined(Base.Experimental, Symbol("@force_compile"))
45+
@test Aborted(frame, 1).at.file == Symbol("timing.jl")
4346
else
4447
@test Aborted(frame, 1).at.file == Symbol("fake.jl")
4548
end
@@ -97,7 +100,7 @@ module EvalLimited end
97100
end
98101
@test 8 < EvalLimited.s < 50 # with Compiled(), 9 statements per iteration
99102
@test length(aborts) == 1
100-
@test aborts[1].at.line (2, 3, 4) # 2 corresponds to lowering of the for loop
103+
@test aborts[1].at.line (2, 3, 4, 5) # 2 corresponds to lowering of the for loop
101104

102105
# Now try again with recursive stack
103106
empty!(aborts)
@@ -116,8 +119,8 @@ module EvalLimited end
116119
@test length(aborts) == 1
117120
lin = aborts[1].at
118121
if lin.file == Symbol("fake.jl")
119-
@test lin.line (2, 3, 4)
122+
@test lin.line (2, 3, 4, 5)
120123
else
121-
@test lin.file == Symbol("range.jl") # if it aborts in `iterate`
124+
@test lin.method === :iterate || lin.method === :getproperty
122125
end
123126
end

0 commit comments

Comments
 (0)