Bug 85933 - Type parameters in anonymous type is missing
Summary: Type parameters in anonymous type is missing
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-20 21:47 EST by Olivier Thomann CLA
Modified: 2005-03-30 22:59 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2005-02-20 21:47:42 EST
Using HEAD, the following code doesn't compile. The parser is losing the
Exception type parameters for the M type.

public class X { 
    public static void main(String argv[]) {
		
		new X().new M<Exception>(null) {
			void run() {
				Exception e = ex;
				System.out.println("SUCCESS");
			}
		}.run();
    }
    class M<E extends Throwable> {
        E ex;
        M(E ex) {
            this.ex = ex;
        }
    }
}
Comment 1 Olivier Thomann CLA 2005-02-20 21:49:34 EST
Fixed and released in HEAD.
Regression test added in GenericTypeTest.test512.
Comment 2 Olivier Thomann CLA 2005-03-30 22:59:09 EST
Verified in 20050330-0500