-
-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ban unstable variables #4018
Ban unstable variables #4018
Conversation
I've opened a new PR for this as ponycheck goes boom with this change. See .https://ponylang.zulipchat.com/#narrow/stream/190359-ci/topic/Breakage.20against.20main.20failures |
This last fix avoids the crash, but it doesn't seem to always be the right behavior so I'll need more here. We can compare to Array.init, which requires ephemerality to make Otherwise suppose we have a signature like: On the other hand, |
#4026) This fixes a small stdlib issue discovered during: #4018 The signatures for map and map_stateful in itertools were overly strict, requiring `B^` instead of just `B`, but only returned `Iter[B]`. Thus it had to be instantiated with `iso^` in some cases, exercising a bug with double ephemerals. This is not a breaking change.
a86de83
to
f3fe9d1
Compare
This is good to go as far as I can tell. Review could benefit by making sure there's no case missing from the tests. |
(This should be rejected earlier but in case the compiler has a bug it's the code's fault)
9d9afa7
to
9888b96
Compare
I rebased this against |
Failing test is unrelated. |
This PR introduces checks around variables and other unaliasing points, to reject programs which attempt to create variables whose capabilities are inherently unsound. The checks about compatibility of intersections have been moved to this check after investigation of the origin, as it is not needed for soundness, but this can be reinstated in the original location if helpful for engineering purposes.
Fixes #3931
Some generic code may still produce unsoundness after instantiating, but this change is hopefully a step-forwarding to introducing the necessary constraints.