Possible dispatch error leading to Julia freezing #7534
Labels
needs tests
Unit tests are required for this change
types and dispatch
Types, subtyping and method dispatch
I've come across what seems to me to be a bug in Julia, related to dispatch, I guess. I've reduce the problem to a couple of simple examples; one is given below, and another (with more undefined variables etc. that go undetected) can be found in the discussion at Julia-Users. In my original code, the problem is that the dispatch seems to go to the wrong function, creating infinite mutual recursion. In the simplified code below, I've removed the alternative function (and other scaffolding code), so the expected behavior would be a method error, I guess?
When I run this, I would have expected:
Instead, the code just hangs. I'm not sure if it's really looping between
foo
andbar
—I haven't been able to produce any evidence of that, really. Printing (with flushing) doesn't work, and undefined variables are ignored (c.f., the longer example on Julia-Users). Could it be some loop/mutual recursion going on in Julia itself (in the inference/dispatch)?Here's my
versioninfo()
:The text was updated successfully, but these errors were encountered: