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
@odersky@nicolasstucki should we add this to how subtyping is handling generic tuples? I'm also wondering whether it's worth the time to try to unpick the tuple vs generic tuple subtyping relationship... and try to do it more correctly.
There's a shared belief that TupleXXL.unapplySeq shouldn't be the unapply symbol, because TupleXXL should only exist after Erasure (PatternMatcher is before). But Typer's typedTuple does use TupleXXL. Now that might be because we didn't have what we have now in Tuple.scala. But also because the only unapply we have is *:.unapply which only deconstructs head and tail. So maybe we can add a Tuple.unapplySeq(x: Tuple): Option[Seq[Any]] and use that instead in Typer, but provided we switch small arities to be efficient.
Compiler version
3.1.1
Minimized code
Output
Expectation
I think the compiler is wrong. The match would not fail on this pattern.
There is no warning for non-XXL tuples.
The text was updated successfully, but these errors were encountered: