coalton-lang / coalton

Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.
https://coalton-lang.github.io/
MIT License
1.15k stars 70 forks source link

Inliner doesn't work with `return` #1202

Closed stylewarning closed 2 months ago

stylewarning commented 2 months ago

When return is present in code, the return itself "loses" the function it intended to return from. The return is blindly inlined into the function above it, wreaking all kinds of havoc.

stylewarning commented 2 months ago

One trouble we have is that inlining is happening on Coalton ASTs, and there's no node that represents something like a CL block.