-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Preserve HKTypeLambdas representing kinds in wildApprox #6240
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
Conversation
wildApprox should not replace references to type params of HKTypeLambdas which represent kinds with wildcards. Fixes #i6238.
test performance please |
performance test scheduled: 2 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/6240/ to see the changes. Benchmarks is based on merging with master (7143421) |
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.
Generally, it's recommended to push your branch to staging and make the PR from there because this makes it easier to collaborate.
tl.paramInfos.forall { | ||
case TypeBounds(lo, hi) => | ||
def isKindBound(tp: Type): Boolean = | ||
Inferencing.isFullyDefined(tp, ForceDegree.none) || (tp match { |
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.
It would be good to have some explanations about the logic here as a comment. In particular I did not understand why a fully defined bounds represents a kind.
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 am also worried about performance implications. isFullyDefined
is not cheap, and wildApprox
is a hotspot.
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.
Doesn't isKindBound
also need to return true
for AnyKind
? If not, we could use a comment explaining why that's the case.
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'm just finishing up with a different approach ... no need to continue reviewing this.
Superseded by #6271. |
wildApprox
should not replace references to type params ofHKTypeLambdas
which represent kinds with wildcards.Fixes #6238.