Bug 63555

Summary: [1.5] Cannot put generic type fields inside static inner class
Product: [Eclipse Project] JDT Reporter: Artur Biesiadowski <abies>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sma
Version: 3.0   
Target Milestone: 3.1 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Artur Biesiadowski CLA 2004-05-22 17:49:26 EDT
public class Alpha {
	static class Beta<T> {
		T obj;
	}
}

This simple case gives error in cheetah 0.5:
"Cannot make a static reference to the type parameter T"
It compiles fine with javac from 1.5.0b1.
Error occurs only for static inner classes - non-static ones seem to be ok.
Comment 1 Philipe Mulet CLA 2004-05-23 16:17:18 EDT
Reproduced. Regression test added: GenericTypeTest#test205.

Problem was that insideStaticContext flag was positionned too early for 
ClassScope, when it should only be positionned after the type variable lookup 
(Scope#getTypeOrPackage(char[], int)).

Fixed.
Comment 2 Philipe Mulet CLA 2004-05-23 16:21:59 EDT
*** Bug 63592 has been marked as a duplicate of this bug. ***