You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A field bound by a record pattern is read after the callee of the call it feeds #9352
let {x} = r reads the field at the let. When x is then the argument of a call, the generated JS reads the field at the call, after JavaScript has evaluated the callee. The field can change in between: a record with a mutable field can be coerced to a type where the field is immutable (#9086).
This prints 2. It should print 1. #9296 fixes the same order for let x = view.x; next()(x), but not for the pattern.
The cause is in matching.ml: make_record_matching binds a field of a pattern as Alias when its label is immutable, and an Alias binding is read where it is used. I mentioned this case when closing #9223.
Activity