Open LilithHafner opened 9 months ago
This code should print (1, 2) forever, and on Julia 1.0, it does. However, on 1.6 and 1.12 it throws.
(1, 2)
accumulate([1,2,3]) do args... while true println(args) end end
Just because we can infer that something does not return does not mean we may turn it into an error. Infinite loops are not UB in Julia.
Weakly related to #53438
Infinite loops have been UB in julia, see https://github.com/JuliaLang/julia/issues/40009. There's currently a mix going on between what inference assumes and what LLVM assumes of the code julia generates.
This code should print
(1, 2)
forever, and on Julia 1.0, it does. However, on 1.6 and 1.12 it throws.Just because we can infer that something does not return does not mean we may turn it into an error. Infinite loops are not UB in Julia.
Weakly related to #53438