You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type A{T}
endA{T}(a::T) =A{T}()
functionf(a)
ifrand() >100returnf(A(a))
endend@code_warntypef(1)
Even though the recursion path will never be executed, type inference will still try to infer the type of the recursion call with a infinitely deep type and even if there's a genuine infinite recursion, it's better to do that at runtime and not in type inference.....
We already have a bunch of limit on type length so I think we should probably also have some limit here.
@carnaval Does green-fairy provide any general solution to these problems?
The text was updated successfully, but these errors were encountered:
See point 2 in JuliaLang/LinearAlgebra.jl#283
A minimum repro is,
Even though the recursion path will never be executed, type inference will still try to infer the type of the recursion call with a infinitely deep type and even if there's a genuine infinite recursion, it's better to do that at runtime and not in type inference.....
We already have a bunch of limit on type length so I think we should probably also have some limit here.
@carnaval Does green-fairy provide any general solution to these problems?
The text was updated successfully, but these errors were encountered: