Skip to content

dotty class file parser doesn't accept Java8 bytecode #83

Closed
@retronym

Description

@retronym
./bin/dotc test.scala
exception caught when loading class GenericDeclaration: ERROR at ?: error while loading AnnotatedElement,
 class file /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class) is broken, reading aborted with java.lang.RuntimeException: bad constant pool tag 18 at byte 76.getClass
bad constant pool tag 18 at byte 76
exception caught when loading class Class: ERROR at ?: error while loading AnnotatedElement,
 class file /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class) is broken, reading aborted with java.lang.RuntimeException: bad constant pool tag 18 at byte 76.getClass
bad constant pool tag 18 at byte 76
error occurred during: ClassInfo(ThisType(module class lang), class Object): ClassInfo(ThisType(module class lang), class Object) member getClass
Exception in thread "main" ERROR at ?: error while loading AnnotatedElement,
 class file /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class) is broken, reading aborted with java.lang.RuntimeException: bad constant pool tag 18 at byte 76.getClass
bad constant pool tag 18 at byte 76

Scala 2.10.4 handles this correctly.

git log v2.10.0..v2.10.4-RC3 --oneline -- /Users/jason/code/scala/src/compiler/scala/tools/nsc/symtab/classfile
f0d913b SI-8062 Fix inliner cycle with recursion, separate compilation
ed230b5 Merge remote-tracking branch 'origin/2.10.2' into merge/2.10.2-to-2.10.x
f91242c SI-7014 Annot arg may refer to annotated class's member
050b4c9 SI-7455 Drop dummy param for synthetic access constructor
75251f7 SI-7532 Fix regression in Java inner classfile reader
90ac5c4 [nomaster] SI-5923 instantiates targs in deferred macro applications
1ee5cc4 Merge pull request #2456 from paulp/pr/jdk8-210x
34d28aa Merge pull request #2458 from paulp/issue/7426-210
3abdaf4 SI-5634 eliminate overly verbose error message
df3cae7 SI-7426 Crash in pickler.
b2c67b3 SI-7398 Add support for java8 default methods
28a6574 Merge pull request #2257 from JamesIry/2.10.x_classfile_51
b7cbda7 Log when invokedynamic instruction is encountered
395e90a SI-7251, compiler crash with $.
e78896f Read version 51 (JDK 7) class files.
4f1bfec Fix SI-7107: scala now thinks every exception is polymorphic
9164c2a Merge pull request #2035 from scalamacros/ticket/6989
02ed5fb SI-6989 privateWithin is now populated in reflect
0bcdf71 pullrequest feedback
f1701f7 SI-7008 @throws annotations are now populated in reflect
309ff57 Merge pull request #2015 from paulp/rc1-backports
fefe6cc SI-7009: `@throws` annotation synthesized incorrectly
f3f1e50 SI-5353, imperfect error message.
7ee299b evicts assert(false) from the compiler
aedc853 Merge branch '2.10.0-wip' into merge-2.10.0

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions