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
Thanks for the reports. As mentioned on the Scala 2 ticket, the type of the expression is Any (because if/else takes the expected type if there is one), but maybe expressions with arms can be special-cased. Edit: the tree type is a union of the arms.
Compiler version
3.7.1-RC1
Minimized code
With scalacOptions including
compile this code:
see https://scastie.scala-lang.org/Y9lVvpVjRUeL7P08bs8Heg
Output
there is a warning raised on line 2:
"interpolation uses toString"
Expectation
compiles without warnings, as the type of the expression is a String
Additional info
Also fails on 2.13.16
Feature introduced in #20578
The text was updated successfully, but these errors were encountered: