Bug 176528 - java.lang.AbstractMethodError when using pathological covariance
Summary: java.lang.AbstractMethodError when using pathological covariance
Status: VERIFIED DUPLICATE of bug 168331
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows Vista
: P3 blocker with 1 vote (vote)
Target Milestone: 3.3 M5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 15:13 EST by Peter M. Murray CLA
Modified: 2007-03-20 11:01 EDT (History)
0 users

See Also:


Attachments
Java file which exhibits this problem (1.33 KB, application/octet-stream)
2007-03-06 15:20 EST, Peter M. Murray CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter M. Murray CLA 2007-03-06 15:13:35 EST
Build ID: I20061214-1445

Steps To Reproduce:
1.Import the attached archived project into vanilla Eclipse configured with 1.5 or 1.6 jre.  Run the TestCovariantReturnMadness class.  You will get the following output:
1.6.0
THIS WORKS
    ROOT: TestCovariantReturnMadness$Root@1fb8ee3
THIS ALSO WORKS
    ROOT: TestCovariantReturnMadness$Root@61de33
BUT THIS DOES NOT WORK
Exception in thread "main" java.lang.AbstractMethodError: TestCovariantReturnMadness$Leaf.getRoot()LTestCovariantReturnMadness$OutsideRoot;
	at TestCovariantReturnMadness.testCovariantMadness(TestCovariantReturnMadness.java:56)
	at TestCovariantReturnMadness.main(TestCovariantReturnMadness.java:61)


More information:
Notes:

This is with 3.3M5 on both Java5 and Java6 compliance levels running with either 1.5.0_06 and 1.6.0

This exact file if compiled by the 1.5.0_06 or the 1.6.0 compiler from Sun will run without the exception.
Comment 1 Peter M. Murray CLA 2007-03-06 15:20:33 EST
Created attachment 60337 [details]
Java file which exhibits this problem

I decided to ship you only the java file and not the exported project.
Comment 2 Peter M. Murray CLA 2007-03-06 15:22:07 EST
I'm bumping this to a blocker because it means that our external api (represented in the test as Outside* interfaces) is not usable with the Eclipse compiler.
Comment 3 Olivier Thomann CLA 2007-03-06 15:29:25 EST
This looks like a dup of bug 168331.
This is fixed with 3.3M5.

*** This bug has been marked as a duplicate of bug 168331 ***
Comment 4 Olivier Thomann CLA 2007-03-06 15:30:35 EST
Please try 3.3M5 and let us know if it works for you.
I could successfully compile and run your example using 3.3M5.
Comment 5 Peter M. Murray CLA 2007-03-06 15:46:31 EST
I apologize for my confusion.  My machine was on M4, not M5 as I indicated.  Thank you for your prompt response!  Works fine on M5.
Comment 6 Olivier Thomann CLA 2007-03-20 11:01:13 EDT
Verified for 3.3 M5 using 3.3M5 build.