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

compiler crash involving case class and inner object within a companion object #5084

Closed
scabug opened this issue Oct 17, 2011 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Oct 17, 2011

Latest trunk.

case class Search(tpe: Search.Value)
object Search
{
   object Value
}

gets you

Search.scala:2: error: illegal cyclic reference involving class Search
object Search
       ^
error: java.lang.Error: no progress in completing object Search:<?>
	at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:33)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:891)
	at scala.reflect.internal.Symbols$Symbol.isSerializable(Symbols.scala:456)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1388)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4009)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4355)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2172)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2260)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2260)
	at scala.collection.immutable.List.loop$1(List.scala:150)
	at scala.collection.immutable.List.mapConserve(List.scala:166)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2260)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4002)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4355)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4414)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:94)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:370)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:86)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:86)
	at scala.collection.Iterator$class.foreach(Iterator.scala:690)
	at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:319)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:86)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1031)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1006)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1119)
	at scala.tools.nsc.Driver.doCompile(Driver.scala:31)
	at scala.tools.nsc.Main$.doCompile(Main.scala:81)
	at scala.tools.nsc.Driver.process(Driver.scala:52)
	at scala.tools.nsc.Driver.main(Driver.scala:65)
	at scala.tools.nsc.Main.main(Main.scala)

This is a reduced example from sbt, which currently can't be compiled for 2.10. I tried to search for a duplicate in jira but there was nothing obvious so hopefully it isn't one.

@scabug
Copy link
Author

scabug commented Oct 17, 2011

Imported From: https://issues.scala-lang.org/browse/SI-5084?orig=1
Reporter: @hubertp
Affected Versions: 2.9.2

@scabug
Copy link
Author

scabug commented Oct 17, 2011

@hubertp said:
Actually, this has nothing to do with Enumeration. Provided reduced example.

@scabug
Copy link
Author

scabug commented Oct 17, 2011

@paulp said:
Yeah, this has been the subject of quite some discussion lately, I'm sorry it was initiated via email and isn't here in ticketland. Tell mirco and iulian you need to be in the loop! I'm working on it.

@scabug
Copy link
Author

scabug commented Nov 10, 2011

@paulp said:
Am planning on reverting ProductN in the short term.

@scabug
Copy link
Author

scabug commented Dec 20, 2011

@paulp said:
Reverted ProductN, test case in 31517aa07c47 .

@scabug scabug closed this as completed Dec 20, 2011
@scabug scabug added the blocker label Apr 7, 2017
@scabug scabug added this to the 2.10.0 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