Bringing light to this here for more visibility: 7302
Also discussed here on Zulip.
TL;DR: I have a when expression with about 20 clauses, 7 of which have guards. I get an unwork-aroundable compiler crash during mono IR unless I remove one of two guards (The same set of guards are used in the same order, but don't cause an issue).
All this because I wanted to see if avoiding Strings would make my AOC solution faster!
Thank you for digging into and reporting this.
No worries, I found a fix, and it's not pleasant and I think harmed the perf of the solution. But I updated the issue with good information on what allowed me to work around it
I'd love to know if any function inlining happens in guards, because if not I'd try moving the guard logic back out of functions
My last hope without getting _clever_ would be to try recursively inspecting a List U8
and building up the list of ops that way, and hope the compiler will emit a loop instead
Last updated: Jul 06 2025 at 12:14 UTC