Skip to content

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

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

Closed
retronym opened this issue Mar 19, 2014 · 1 comment
Closed

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

retronym opened this issue Mar 19, 2014 · 1 comment
Assignees

Comments

@retronym
Copy link
Member

./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
@odersky
Copy link
Contributor

odersky commented Mar 20, 2014

Samuel do you think you could take a look? The idea would be to go through the Scala 2.11 commits and selectively apply them to the dotty classfile parser. Some of these will almost certainly have to be adapted. The two parsers are similar but not the same.

OlivierBlanvillain pushed a commit to OlivierBlanvillain/dotty that referenced this issue Dec 8, 2016
OlivierBlanvillain pushed a commit to OlivierBlanvillain/dotty that referenced this issue Dec 12, 2016
WojciechMazur pushed a commit to WojciechMazur/dotty that referenced this issue Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants