Skip to content

Commit f7e2853

Browse files
committed
Avoid inference hang in tests
1 parent ba50d3e commit f7e2853

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
@@ -224,15 +224,19 @@ for C in (A, B)
224224
end
225225
C1t = @inferred(op(C, Axis{:y}))
226226
@test C1t == C1
227-
C2t = @inferred(op(C, Axis{:x}))
228-
@test C2t == C2
229-
C12t = @inferred(op(C, (Axis{:y},Axis{:x})))
230-
@test C12t == C12
231-
C1t = @inferred(op(C, Axis{:y}()))
232-
@test C1t == C1
233-
C2t = @inferred(op(C, Axis{:x}()))
234-
@test C2t == C2
235-
C12t = @inferred(op(C, (Axis{:y}(),Axis{:x}())))
236-
@test C12t == C12
227+
# Julia 0.5.x hangs in inference on the following tests when
228+
# inlining is off. We want this fixed for Julia 0.6.
229+
if VERSION > v"0.6.0-dev.1" || Base.JLOptions().can_inline==1
230+
C2t = @inferred(op(C, Axis{:x}))
231+
@test C2t == C2
232+
C12t = @inferred(op(C, (Axis{:y},Axis{:x})))
233+
@test C12t == C12
234+
C1t = @inferred(op(C, Axis{:y}()))
235+
@test C1t == C1
236+
C2t = @inferred(op(C, Axis{:x}()))
237+
@test C2t == C2
238+
C12t = @inferred(op(C, (Axis{:y}(),Axis{:x}())))
239+
@test C12t == C12
240+
end
237241
end
238242
end

0 commit comments

Comments
 (0)