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
-- [E007] TypeMismatchError: named-tuple-single-ops.scala:8:31---------------8|valcitySingle:CitySingle= (name ="Lausanne", zip =1000, pop =140000)
|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^|Found: (name : String, zip : Int, pop : Int)
|Required:CitySingle|| longer explanation available when compiling with`-explain`1 error found
Expectation
Singleton types in an expected named tuple type should be propagated to the right-hand side just as in the case for normal tuples.
This currently fails because named tuples expand to typelevel operations that perform too much widening. It's not yet clear whether we want to pursue a solution specific to named tuples or whether we want to improve the type-level possibilities for precise types first and then build on that.
The text was updated successfully, but these errors were encountered:
This could be a deal breaker for Named Tuples to make it to 3.5 as non-experimental. I'm not sure the compatibility story allows to just support it later.
Compiler version
3.5-RC1, with #19174
Minimized example
Output
Expectation
Singleton types in an expected named tuple type should be propagated to the right-hand side just as in the case for normal tuples.
This currently fails because named tuples expand to typelevel operations that perform too much widening. It's not yet clear whether we want to pursue a solution specific to named tuples or whether we want to improve the type-level possibilities for precise types first and then build on that.
The text was updated successfully, but these errors were encountered: