Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
type inference bug for multi-cycle functions #9770
I think I might have stumbled across a bug, possibly in type inference though I'm not sure.
I'd expect that running the following would print "ok" 3 times, instead it prints "ok" once then two blank lines.
Making any one of the following changes results in the expected output. Perhaps this will help point someone who understands Julia's internals at the cause of the unexpected behavior.
I've also just noticed that replacing
All of this is happening with the latest nightly build, details below. I get very similar results using v0.3.4, but not the seg fault.
it appears that somehow inference has tricked itself into thinking that
@JeffBezanson debug dump:
julia> # huh, that's interesting. while inferring
julia> # my resulting hypothesis? all frames between this frame and the top recurred frame need to be marked as recurred, not just those where
does that make sense?
oh, wait. that is what the code doing already.
new hypothesis: there are two cycles (overlapping) going on here (at different points in the function). that causes