Bug 84973 - [1.5] parameterized inner type is illegal without parameterized outer type
Summary: [1.5] parameterized inner type is illegal without parameterized outer type
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-11 02:55 EST by Markus Keller CLA
Modified: 2005-05-11 10:23 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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