Bug 94644 - [1.5][compiler] Non-static member type of raw type should be raw
Summary: [1.5][compiler] Non-static member type of raw type should be raw
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 M7   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-11 06:10 EDT by Philipe Mulet CLA
Modified: 2005-05-12 13:09 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2005-05-11 06:10:34 EDT
Build 20050509

According to JLS 4.8 (3rd edition), all non-static member types of a raw type
should be considered as raw type. As such an unchecked warning is expected for
the following testcase:

public class X {
	public static void main(String[] args) {
		Outer.Inner inner = new Outer().new Inner();
		X x = inner.setOuterT(new X());
	}
}

class Outer<T> {
	T t;
	class Inner {
		T setOuterT(T t1) {
			t = t1;
			return t;
		}
	}
}
Comment 1 Philipe Mulet CLA 2005-05-11 06:11:48 EDT
Added GenericTypeTest#test647.
Comment 2 Philipe Mulet CLA 2005-05-11 13:16:23 EDT
Tuned raw conversion to create RawTypeBinding in this situation instead of
ParameterizedTypeBinding.
Also fixed compatibility rules to be stricter on enclosing types.
Fixed
Comment 3 Philipe Mulet CLA 2005-05-11 18:07:20 EDT
Fixed
Comment 4 Olivier Thomann CLA 2005-05-12 13:09:58 EDT
Verified in I20050510-0010 + JDT/Core v_556