We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a76ecbb commit d54b424Copy full SHA for d54b424
middle_end/flambda2/from_lambda/closure_conversion.ml
@@ -729,7 +729,10 @@ let close_let acc env id user_visible defining_expr
729
| None -> body acc body_env
730
| Some (Prim ((Nullary Begin_region | Unary (End_region, _)), _))
731
when not (Flambda_features.stack_allocation_enabled ()) ->
732
- body acc env
+ (* We use [body_env] to ensure the region variables are still in the
733
+ environment, to avoid lookup errors, even though the [Let] won't be
734
+ generated. *)
735
+ body acc body_env
736
| Some defining_expr -> (
737
let body_env =
738
match defining_expr with
0 commit comments