Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad error message for tuple literals > 22 #9572

Closed
scabug opened this issue Nov 27, 2015 · 4 comments
Closed

Bad error message for tuple literals > 22 #9572

scabug opened this issue Nov 27, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Nov 27, 2015

The error message produced by a tuple literal of a size > 22 in Scala 2.11+ is not very useful:

Welcome to Scala 2.12.0-20151127-104857-5ad0cca2a9 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_60).
Type in expressions for evaluation. Or try :help.

scala> def x = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
<console>:11: error: object <none> is not a member of package scala
       def x = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
               ^

In 2.10 it used to be "object Tuple23 is not a member of package scala".

@scabug
Copy link
Author

scabug commented Nov 27, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9572?orig=1
Reporter: @szeiger
Affected Versions: 2.11.7, 2.12.0-M3

@scabug
Copy link
Author

scabug commented Nov 27, 2015

@szeiger said:
This was prompted by Typesafe support case 5643

@scabug
Copy link
Author

scabug commented Jan 28, 2016

@szeiger said:
Related failure for type trees:

$ scala -nc -e 'def f: (Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int) = null'
Exception in thread "main" java.lang.AssertionError: assertion failed: scala.<none>
	at scala.reflect.internal.Trees$AppliedTypeTree.<init>(Trees.scala:579)
	at scala.reflect.internal.TreeGen.mkTupleType(TreeGen.scala:293)
	at scala.tools.nsc.ast.parser.TreeBuilder.makeTupleType(TreeBuilder.scala:44)
	at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$class.scala$tools$nsc$ast$parser$Parsers$Parser$PatternContextSensitive$$tupleInfixType(Parsers.scala:873)
...

@scabug
Copy link
Author

scabug commented Jan 28, 2016

@szeiger said:
PR: scala/scala#4927

@scabug scabug closed this as completed Feb 1, 2016
@scabug scabug added this to the 2.11.8 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants