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
sjrd
left a comment
There was a problem hiding this comment.
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#superTypealso seems to fix the issue and not break anything. But I'm not very sure about the spec here either way.@sjrd