-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix leak of skolemized types in HRTB #19438
Fix leak of skolemized types in HRTB #19438
Conversation
Hmm, running this test to completion I see that it breaks some tests. (I think that those tests should not have been working in the first place, but what they are doing is fundamentally useful.) The tests are all cases where |
I remember the blanket |
Also, is this related to the lack of an impl of |
…gions and/or cause incorrect results.
have such a silly over-engineered interface.
impl for fn pointer types including bound regions, unfortunately.
issue-14039 test in a more natural way. Previously the "type we will cast to" was hidden unless it was an integer.
db2c80e
to
0693a5b
Compare
* we're not careful, it will succeed. | ||
* | ||
* The reason is that when we walk through the subtyping | ||
* algorith, we begin by replacing `'a` with a skolemized |
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.
nit: "algorith" => "algorithm"
Going to do more work in this area. I'll close this branch for now and re-open with more commits. |
A subtle bug in the higher-ranked sub/lub/glb routines could cause incorrect results and/or leaked skolemized regions, something I've seen from time to time but never quite knew why. Finally tracked it down. Didn't open an issue but there are various tests that report wrong result and/or ICE in the PR.
r? @pnkfelix