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
Now thanks to #18 and .push unfolding. x.push(5) currently fails because it tries to assign to the length.
The problem is this just raises the usual Parameter assignment mismatch. It would be good if it could detect the constraint is a tuple and the length is being modified then it could throw a different diagnostic?
The one problem is that currently pop also tries to modify the value, so two assignment mismatches are thrown. Maybe events could short-circuit? Or go into unknown mode? Or don't print the second assignment mismatch? Or something?
The text was updated successfully, but these errors were encountered:
Currently tuple annotations also make their length a constraint.
So the following fails because { ... length: 3 } is not assignable to { ... length: 2 }
Now thanks to #18 and
.push
unfolding.x.push(5)
currently fails because it tries to assign to the length.The problem is this just raises the usual
Parameter assignment mismatch
. It would be good if it could detect the constraint is a tuple and the length is being modified then it could throw a different diagnostic?The one problem is that currently pop also tries to modify the value, so two assignment mismatches are thrown. Maybe events could short-circuit? Or go into unknown mode? Or don't print the second assignment mismatch? Or something?
The text was updated successfully, but these errors were encountered: