Skip to content

Commit a4492b0

Browse files
committed
Avoid inference hang in tests
1 parent a84f594 commit a4492b0

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

test/core.jl

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,19 @@ for C in (A, B)
222222
end
223223
C1t = @inferred(op(C, Axis{:y}))
224224
@test C1t == C1
225-
C2t = @inferred(op(C, Axis{:x}))
226-
@test C2t == C2
227-
C12t = @inferred(op(C, (Axis{:y},Axis{:x})))
228-
@test C12t == C12
229-
C1t = @inferred(op(C, Axis{:y}()))
230-
@test C1t == C1
231-
C2t = @inferred(op(C, Axis{:x}()))
232-
@test C2t == C2
233-
C12t = @inferred(op(C, (Axis{:y}(),Axis{:x}())))
234-
@test C12t == C12
225+
# Julia 0.5.x hangs in inference on the following tests when
226+
# inlining is off. We want this fixed for Julia 0.6.
227+
if VERSION > v"0.6.0-dev.1" || Base.JLOptions().can_inline==1
228+
C2t = @inferred(op(C, Axis{:x}))
229+
@test C2t == C2
230+
C12t = @inferred(op(C, (Axis{:y},Axis{:x})))
231+
@test C12t == C12
232+
C1t = @inferred(op(C, Axis{:y}()))
233+
@test C1t == C1
234+
C2t = @inferred(op(C, Axis{:x}()))
235+
@test C2t == C2
236+
C12t = @inferred(op(C, (Axis{:y}(),Axis{:x}())))
237+
@test C12t == C12
238+
end
235239
end
236240
end

0 commit comments

Comments
 (0)