-
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
tryCompiletimeConstantFold in disjointnessBoundary #20168
Conversation
84307b4
to
c45bcf7
Compare
I believe this requires a spec change. Maybe @smarter can address this in scala/improvement-proposals#84 |
But I'm not entirely sure #20166 requires a fix. |
If not the match types, then the compiletime.ops documentation needs to be modified. Right now they are contradictory. scala3/library/src/scala/compiletime/ops/int.scala Lines 5 to 21 in 62e0641
|
I don't understand, where is the contradiction? Where does it state that |
We observe different semantics when replacing usages of |
aaf2dc7
to
6fd2734
Compare
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.
Sorry for dropping this.
AFAICT, this is correct. When we fall in that case, it should be the case that tp =:= tp.tryCompiletimeConstantFold
, so they should agree on being provably disjoint or not.
Fixes #20166
Alternatively placing the tryCompiletimeConstantFold in
AppliedType#superType
also seems to fix the issue and not break anything. But I'm not very sure about the spec here either way.@sjrd