-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Labels
Milestone
Description
A local effect should only be used by functions below it on the stack. In fact any function created above it on the stack cannot have any lexical capture of the variables and therefore cannot use the local effect anyways. It always makes sense to infer a mask for those functions. (Except maybe in the special case of functions that have an explicit local effect and use a byref variable).
All functions created below the variables - as long as they do not escape should be fine to use the local effect.
What about escaping functions? They really shouldn't access local variables, so there is likely no problem here?
Reactions are currently unavailable