Summary: | The Eclipse compiler generates classes that throw a VerifyError | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Tushar Pokle <tushar.pokle> | ||||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | critical | ||||||||
Priority: | P3 | ||||||||
Version: | 2.1 | ||||||||
Target Milestone: | 2.1 RC4 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Tushar Pokle
2003-03-21 07:46:34 EST
Created attachment 4277 [details]
Bug demonstration classes
The VerifyError.jar file contains a simple Eclipse project to demonstrate the
bug. I contains classes that I've compiled using 2.1 rc3a - you may run it by
typing "java -jar VerifyError.jar". Tested with java 1.4.1_01 and 1.4.1_02
The bug is in the innerclass emulation. In reference from Derived$Inner.bug() to 'c.foo', we generate code as if 'c' was defined in enclosing type Derived (where it is defined at depth 0). Method void bug() 0 getstatic #29 <Field java.io.PrintStream out> 3 aload_0 4 getfield #16 <Field oranges.Derived this$0> // SHOULD NOT BE HERE 7 getfield #18 <Field oranges.Derived c> 10 invokestatic #35 <Method java.lang.String access$0(oranges.Derived)> 13 invokevirtual #41 <Method void println(java.lang.String)> 16 return } As a workaround, you may simply write 'this.c.foo' instead of 'c.foo'. Problem isolated. #setDepth implementation weren't doing anything when depth is set to zero (can occur for QualifiedNameReferences when binding subsequent fields). Fix is quite simple. Created attachment 4279 [details]
setDepth patch
Tushar - isn't the workaround a viable solution for 2.1 ? Yes, the workaround is good :-) Thanks for the quick turnaround Philippe :-) +1 +1 +1 +1 Fix released for integration Verified. |