Bug 84973

Summary: [1.5] parameterized inner type is illegal without parameterized outer type
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: martinae
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-02-11 02:55:00 EST
I20050209-0800

A parameterized inner type is illegal without an explicit parameterized outer type:

---------------------------------------------
package xy;
import xy.Map.Entry;

class Map<M> {
    class Entry<E> { }
}
class User {
    void a(Entry<String> e) { } // Entry<String> is illegal (eclipse accepts)
    void c(Map.Entry<String> e) { } // illegal (correctly flagged)
    void b(Entry e) { } // OK
    void d(Map<Integer>.Entry<String> e) { } // OK
}
---------------------------------------------

javac's opinion about "Entry<String>":
improperly formed type, type parameters given on a raw type
Comment 1 Philipe Mulet CLA 2005-04-18 18:26:44 EDT
Tuned ParameterizedSingleTypeReference to better recognize invalid member type
case (when generic). Also increased checking for non-static member type
reference in static context.
Added GenericTypeTest#test613-616+618.
Fixed, will be released along with changes for bug 84496
Comment 2 Philipe Mulet CLA 2005-04-21 09:12:02 EDT
Released
Comment 3 Olivier Thomann CLA 2005-05-11 10:23:32 EDT
Verified in I20050510-0010