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

GenICode crasher under DelayedInit #7213

Closed
scabug opened this issue Mar 4, 2013 · 3 comments
Closed

GenICode crasher under DelayedInit #7213

scabug opened this issue Mar 4, 2013 · 3 comments
Assignees

Comments

@scabug
Copy link

scabug commented Mar 4, 2013

Found by Nithin while working on his Matrix DSL:

$ cat test.scala
package test

trait MatExpWorld { self =>
  class T extends Runner { val expWorld: self.type = self }
}

trait Runner extends DelayedInit {
  val expWorld: MatExpWorld
}


$ ../build/quick/bin/scalac test.scala 
error: symbol value $outer does not exist in test.MatExpWorld$T$delayedInit$body.apply
error: uncaught exception during compilation: scala.reflect.internal.FatalError
error: scala.reflect.internal.FatalError: 
     while compiling: test.scala
        during phase: icode
     library version: version 2.10.2-20130301-114301-5d54cf9e37
    compiler version: version 2.10.2-20130301-114301-5d54cf9e37
  reconstructed args: -no-specialization

  last tree to typer: This(class MatExpWorld$T)
              symbol: class MatExpWorld$T in package test (flags: <lifted>)
   symbol definition: class MatExpWorld$T extends Runner
                 tpe: test.MatExpWorld$T
       symbol owners: class MatExpWorld$T -> package test
      context owners: class MatExpWorld$T -> package test

== Enclosing template or block ==

...

== Expanded type of tree ==

TypeRef(TypeSymbol(class MatExpWorld$T extends Runner))

symbol value $outer does not exist in test.MatExpWorld$T$delayedInit$body.apply
	at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:49)
	at scala.tools.nsc.Global.abort(Global.scala:254)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadIdent$1(GenICode.scala:1038)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:1044)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genLoadArguments$1.apply(GenICode.scala:1246)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genLoadArguments$1.apply(GenICode.scala:1244)
	at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:111)
	at scala.collection.immutable.List.foldLeft(List.scala:84)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadArguments(GenICode.scala:1244)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadApply6$1(GenICode.scala:935)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:967)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genStat(GenICode.scala:187)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genStat$1.apply(GenICode.scala:156)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genStat$1.apply(GenICode.scala:156)
	at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:111)
	at scala.collection.immutable.List.foldLeft(List.scala:84)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genStat(GenICode.scala:156)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:1068)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:124)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:72)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:72)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:72)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:149)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:99)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:72)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:72)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:72)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:90)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:68)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:64)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:464)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:431)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:431)
	at scala.collection.Iterator$class.foreach(Iterator.scala:727)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:431)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:57)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1662)
	at scala.tools.nsc.Driver.doCompile(Driver.scala:33)
	at scala.tools.nsc.Main$.doCompile(Main.scala:79)
	at scala.tools.nsc.Driver.process(Driver.scala:54)
	at scala.tools.nsc.Driver.main(Driver.scala:67)
	at scala.tools.nsc.Main.main(Main.scala)
@scabug
Copy link
Author

scabug commented Mar 4, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7213?orig=1
Reporter: @VladUreche
Affected Versions: 2.10.1-RC2
See #4683

@scabug
Copy link
Author

scabug commented Mar 4, 2013

@retronym said:
Duplicate of #4683

@scabug scabug closed this as completed Mar 4, 2013
@scabug
Copy link
Author

scabug commented Mar 4, 2013

@VladUreche said:
Thanks Jason! And sorry for filing a duplicate, I'll be more careful next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants