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

VerifyError/Compiler crash with FatalError for "new Unit/new Int/..." #5666

Closed
scabug opened this issue Apr 13, 2012 · 4 comments
Closed

VerifyError/Compiler crash with FatalError for "new Unit/new Int/..." #5666

scabug opened this issue Apr 13, 2012 · 4 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Apr 13, 2012

This is a regression in 2.10 trunk. It works in 2.9.2 and earlier.

scala> new Int
error: Cannot instantiate Intof kind: INT
error: 
     while compiling:  <console>
       current phase:  icode
     library version:  version 2.10.0-20120413-153403-c26ef91048
    compiler version:  version 2.10.0-20120413-153403-c26ef91048
  reconstructed args:  

uncaught exception during compilation: scala.reflect.internal.FatalError
scala.reflect.internal.FatalError: 
     while compiling:  <console>
       current phase:  icode
     library version:  version 2.10.0-20120413-153403-c26ef91048
    compiler version:  version 2.10.0-20120413-153403-c26ef91048
  reconstructed args:  

Cannot instantiate Intof kind: INT
	at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:44)
	at scala.tools.nsc.Global.abort(Global.scala:193)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:823)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genStat(GenICode.scala:167)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genStat$1.apply(GenICode.scala:147)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genStat$1.apply(GenICode.scala:147)
	at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:111)
	at scala.collection.immutable.List.foldLeft(List.scala:77)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genStat(GenICode.scala:147)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:1022)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:115)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71)
	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
	at scala.collection.immutable.List.foreach(List.scala:77)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:71)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:140)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:90)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71)
	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
	at scala.collection.immutable.List.foreach(List.scala:77)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:71)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:81)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:67)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:63)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:423)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:389)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:383)
	at scala.collection.Iterator$class.foreach(Iterator.scala:697)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1124)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:383)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:56)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1305)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1278)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1272)
	at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:455)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:837)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:795)
	at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:968)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:622)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:589)
	at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:777)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:831)
	at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:734)
	at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:598)
	at scala.tools.nsc.interpreter.ILoop.innerLoop$1(ILoop.scala:605)
	at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:608)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:911)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:873)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:873)
	at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:155)
	at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:873)
	at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:79)
	at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:92)
	at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:101)
	at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

scala> new Unit
java.lang.VerifyError: (class: , method: <init> signature: ()V) Call to wrong initialization method
	at .<init>(<console>:7)
	at .<clinit>(<console>)
	at $print(<console>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:767)
	at scala.tools.nsc.interpreter.IMain$Request$$anonfun$15.apply(IMain.scala:1018)
	at scala.tools.nsc.interpreter.Line.scala$tools$nsc$interpreter$Line$$runAndSetState(Line.scala:41)
	at scala.tools.nsc.interpreter.Line$$anonfun$2.apply$mcV$sp(Line.scala:47)
	at scala.tools.nsc.io.package$$anon$2.run(package.scala:19)
	at java.lang.Thread.run(Thread.java:679)

The error message is also missing a space between "... Intof ...".

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Apr 13, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5666?orig=1
Reporter: @soc
Affected Versions: 2.10.0
Other Milestones: 2.10.0
Attachments:

  • t5666.check (created on Apr 13, 2012 4:05:56 PM UTC, 922 bytes)
  • t5666.scala (created on Apr 13, 2012 4:05:56 PM UTC, 158 bytes)
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Apr 13, 2012

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented May 2, 2012

@soc said:
Sorry, used the wrong version. This isn't fixed in2.10.0-20120430-094203-cfd037271e, although I wonder how the tests run without failure since the test case was merged in scala/scala@9b50dc0 ...

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented May 2, 2012

@soc said:
Fixed in scala/scala@e69ee36.

@scabug scabug closed this May 2, 2012
@scabug scabug added this to the 2.10.0-M3 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.