-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Make reach refinement shallow #19171
Conversation
try | ||
if variance <= 0 then isFlipped = true | ||
t.dealias match | ||
case t1 @ CapturingType(p, cs) if cs.isUniversal => |
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.
I think the logic can be simplified a bit by this:
case t1 @ CapturingType(p, cs) if cs.isUniversal => | |
case t1 @ CapturingType(p, cs) if cs.isUniversal && !isFlipped => |
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.
Otherwise LGTM
t.dealias match | ||
case t1 @ CapturingType(p, cs) if cs.isUniversal => | ||
if variance > 0 then | ||
t1.derivedCapturingType(apply(p), if isFlipped then cs else ref.reach.singletonCaptureSet) |
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.
Then you can leave things as they were here.
ce71765
to
64242f4
Compare
This is to address the following soundness issue: