-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add type refinement for abstract type bindings #4688
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
Add type refinement for abstract type bindings #4688
Conversation
|
If I can write any type on the rhs of |
|
There are still some constraints that must be added. |
7e2a1ad to
4c28eb1
Compare
|
But do we have a way to add constraints that makes this sound? I thought the plan was to warn the user that they use an escape hatch, just like |
a0aeea7 to
1426e07
Compare
006ee48 to
1582173
Compare
Blaisorblade
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently prefer a different approach to the problem — we lose guarantees on the values, but we get type soundness back, and @nicolasstucki's on it. Up to him to close or update this PR.
|
@Blaisorblade the current implementation in this PR is a partial implementation of the new scheme. |
1582173 to
43835b3
Compare
f909b8e to
cd8fd76
Compare
|
The unboxed result of |
|
FWIW: last I tried to write value class decorators with a single member, I ran into #4583, which seems hard to avoid. |
dfb8174 to
67bb6e6
Compare
|
Will reopen it when I'll have time to work on it |
No description provided.