E014: Tuple Too Long
This error was removed before Scala 3.0.0 was released and was never emitted by the Scala 3 compiler.
What it did
This error was triggered when creating a tuple literal with more than 22 elements.
Example
val t = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
Error
-- [E014] Syntax Error: example.scala:1:8 --------------------------------------
1 |val t = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
| ^
| A tuple cannot have more than 22 members
Explanation
In early versions of Dotty (before Scala 3.0.0), tuples were limited to 22 elements, similar to Scala 2. The error message suggested using nested tuples as a workaround:
// Workaround with nested tuples (no longer needed)
val t = ((1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22), (23))
This restriction was removed in commit 2d1427d5aa (August 2018) with "Allow tuple literals to extend beyond 22". Since Scala 3.0.0, tuples can have any number of elements without restriction.
In this article