stackoverflow anonymous function #37868
Labels
compiler:lowering
Syntax lowering (compiler front end, 2nd stage)
kind:bug
Indicates an unexpected problem or unintended behavior
While there are a number of bug reports open about stackoverflows when defining functions (so this issue is possibly a duplicate), the examples looked quite different : #36185 , #36804,#36544
The issue I'm actually trying to solve is that when inference fails, it causes really significant startup overhead (possibly because the packages I'm using are template heavy ?). I often lose type stability because I use anonymous functions, which depend on variables outside their scope (so like in the example). This is really annoying, and the only workaround I found so far was to sprinkle let blocks everywhere. Of course - ideally - the workaround shouldn't be necessary and julia would simply stop failing to infer those things. I was trying out the following macro as a workaround, which would then fix the types of the variables it get's passed to:
If anyone knows another way to get this to work, I would be very grateful.
The text was updated successfully, but these errors were encountered: