Skip to content

invalid code crashes dotty: assertion failed: attempt to parse java.lang.Object from classfile #1706

@zhendongsu

Description

@zhendongsu
$ dotc t.scala
exception caught when loading module class Object$: java.lang.AssertionError: assertion failed: attempt to parse java.lang.Object from classfile

exception occurred while typechecking t.scala

exception occurred while compiling t.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: attempt to parse java.lang.Object from classfile
	at scala.Predef$.assert(Predef.scala:165)
	at dotty.tools.dotc.core.classfile.ClassfileParser$ConstantPool.getSuperClass(ClassfileParser.scala:1017)
	at dotty.tools.dotc.core.classfile.ClassfileParser.parseParents$1(ClassfileParser.scala:103)

<snipped>

$ 
$ cat t.scala
object Test {
  println (Object.reflect.runtime.universe.reify (new Object().getClass))
} 
$ 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions