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

Type alias for tuple > 22 crashes compiler #9340

Closed
scabug opened this issue Jun 2, 2015 · 2 comments
Closed

Type alias for tuple > 22 crashes compiler #9340

scabug opened this issue Jun 2, 2015 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Jun 2, 2015

Compiling a file with type = (tuple with more than 22 fields) causes the compiler to crash. I've attached a simple scalatest test.

Here is top of the stack trace:
java.lang.AssertionError: assertion failed: scala.
at scala.reflect.internal.Trees$AppliedTypeTree.(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)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$$anonfun$typ$1.apply(Parsers.scala:906)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$$anonfun$typ$1.apply(Parsers.scala:903)
at scala.tools.nsc.ast.parser.Parsers$Parser.placeholderTypeBoundary(Parsers.scala:485)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$class.typ(Parsers.scala:903)
at scala.tools.nsc.ast.parser.Parsers$Parser$outPattern$.typ(Parsers.scala:1993)
at scala.tools.nsc.ast.parser.Parsers$Parser.typ(Parsers.scala:2013)
at scala.tools.nsc.ast.parser.Parsers$Parser.typeDefOrDcl(Parsers.scala:2679)
at scala.tools.nsc.ast.parser.Parsers$Parser.defOrDcl(Parsers.scala:2463)
at scala.tools.nsc.ast.parser.Parsers$Parser.nonLocalDefOrDcl(Parsers.scala:2473)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStat$1$$anonfun$applyOrElse$3.apply(Parsers.scala:3030)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStat$1$$anonfun$applyOrElse$3.apply(Parsers.scala:3030)

@scabug
Copy link
Author

scabug commented Jun 2, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9340?orig=1
Reporter: Joe F (fullness)
Affected Versions: 2.11.6
Attachments:

@scabug
Copy link
Author

scabug commented Apr 7, 2016

@szeiger said:
This was fixed by scala/scala#4927:

$ ../scala/build/quick/bin/scalac BigTupleSpec.scala
BigTupleSpec.scala:7: error: too many elements for tuple: 23, allowed: 22
  type Big = (
             ^
BigTupleSpec.scala:17: error: too many elements for tuple: 23, allowed: 22
      val foo: Big = (
                     ^
two errors found

@scabug scabug closed this as completed Apr 7, 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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants