[hir] Lower function expressions into HIR
Sathya Gunasekaran committed
Feb 8, 2023 at 17:45 UTC
394666118d565d00cf2874c6c71e2c92ce714606
1 file changed
+5
-4
compiler/forget/src/Inference/InferReferenceEffects.ts
+5
-4
@@ -227,10 +227,11 @@ class Environment {
227
*/
228
alias(place: Place, value: Place) {
229
const values = this.#variables.get(value.identifier.id);
230
- // A value can be undefined if it has been captured from outside scope.
231
- if (value === undefined) {
232
- return;
233
- }
230
+ invariant(
231
+ values != null,
232
+ "Expected value for identifier `%s` to be initialized.",
233
+ value.identifier.id
234
+ );
235
this.#variables.set(place.identifier.id, new Set(values));
236
}
237