Fix optimizer bug for closures.

This commit is contained in:
Stephen Chung
2023-04-09 16:31:06 +08:00
parent 6ee4a1efa6
commit 8369a9bf63
2 changed files with 15 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ Buf fixes
----------
* `is_shared` is a reserved keyword and is now handled properly (e.g. it cannot be the target of a function pointer).
* Re-optimizing an AST via `optimize_ast` with constants now works correctly for closures. Previously the hidden `Share` nodes are not removed and causes variable-not-found errors during runtime if the constants are not available in the scope.
New features
------------