StrongerXi / soc

Compiler for a subset of OCaml
1 stars 0 forks source link

Fix var namer #40

Closed StrongerXi closed 3 years ago

StrongerXi commented 3 years ago

Renaming variables in AST is closely coupled with scoping rules. I messed up the scoping rule for non-recursive let bindings, this PR fixes the bug and adds regression test.

It also discovers and documents a bug in renaming for prim-ops and native functions. It's intentionally left unresolved for now. See c82302f for details.