[hir] Lower function expressions into HIR

This commit is contained in:
Sathya Gunasekaran
2023-02-08 17:45:33 +00:00
parent 662b8d2ff3
commit 394666118d
@@ -227,10 +227,11 @@ class Environment {
*/
alias(place: Place, value: Place) {
const values = this.#variables.get(value.identifier.id);
// A value can be undefined if it has been captured from outside scope.
if (value === undefined) {
return;
}
invariant(
values != null,
"Expected value for identifier `%s` to be initialized.",
value.identifier.id
);
this.#variables.set(place.identifier.id, new Set(values));
}