Open TimDeve opened 2 years ago
copying over some thoughts from chat:
this is similar to issue #597 but what's probably happening here is s
gets too different types in the match clause and body, which results in it being assigned two different deleters. We can probably handle this similarly to the way shadows were handled in #597 and use a new state for the body scope that we pop afterwards.
For the double-free issue, the problem is sort of the opposite phenomenon where a variable that should be treated as the same is being treated as distinct. This might be because of the state popping happening in let
bindings now, but I'm not sure.
Allocating inside a lambda an using the value in a nested lambda results in double free:
With Matches
Using
match
confuses the compilerCompiler output:
While using match-ref results in a badly emitted C source:
Output: