Bug 220361 - [1.5][compiler] Compiler incorrectly rejects static raw member type as parameterized
Summary: [1.5][compiler] Compiler incorrectly rejects static raw member type as parame...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 226145 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-26 07:48 EST by Philipe Mulet CLA
Modified: 2008-04-09 07: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 Philipe Mulet CLA 2008-02-26 07:48:06 EST
Build 3.4m5

The following code should be accepted, and Eclipse currently rejects it:

public class X<U, V> {
	static class Table {
		X.Table.State<String> s;

		Table() {
			this.s = new X.Table.State<String>();
		}

		static class State<T> {
		}
	}
}

It currently produces the 2 (invalid) errors:
----------
1. ERROR in X.java (at line 4)
	X.Table.State<String> s;
	^^^^^^^^^^^^^
The member type X.Table.State cannot be qualified with a parameterized type, since it is static. Remove arguments from qualifying type X.Table
----------
2. ERROR in X.java (at line 7)
	this.s = new X.Table.State<String>();
	             ^^^^^^^^^^^^^
The member type X.Table.State cannot be qualified with a parameterized type, since it is static. Remove arguments from qualifying type X.Table
----------
Comment 1 Philipe Mulet CLA 2008-02-26 07:50:54 EST
Added GenericTypeTest#1299-1300
Comment 2 Philipe Mulet CLA 2008-02-27 10:46:19 EST
Patch combined with https://bugs.eclipse.org/bugs/attachment.cgi?id=90846

Also added GenericTypeTest#1301-1302

Released for 3.4M6.
Fixed
Comment 3 Philipe Mulet CLA 2008-02-28 07:35:07 EST
Released fix in 3.3.x maintenance branch (post 3.3.2)
Comment 4 Frederic Fusier CLA 2008-03-25 12:53:06 EDT
Verified for 3.4M6 using I20080324-1300.
Comment 5 Philipe Mulet CLA 2008-04-09 07:23:55 EDT
*** Bug 226145 has been marked as a duplicate of this bug. ***