You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's because the compiler cannot reduce a type when it contains and intersection with a final type, like a String or it's singleton version, e.g. these two snippets don't compile
traitTagtypeId[A] =AtypeTagged= ("abc"withTag) matchcaseId[t] => t
valev= summon[Tagged=:= ("abc"withTag)]
traitFootraitTagtypeId[A] =AtypeTagged= (FoowithTag) matchcaseId[t] => t
valev= summon[Tagged=:= (FoowithTag)]
but this one does:
traitTagtypeId[A] =AtypeTagged= (StringwithTag) matchcaseId[t] => t
valev= summon[Tagged=:= (StringwithTag)]
Actually I'm not really sure something like "abc" with Tag should be considered a valid type.
Could such types cause some soundness issues? @odersky@smarter
Compiler version
3.2.1
Minimized code
https://scastie.scala-lang.org/mrdziuban/kOxLqWh4S5iXYTAqxvY6gw/11
Output
Expectation
The compiler can prove that
Tuple.Tail[ISB] =:= SB
The text was updated successfully, but these errors were encountered: