Bug 107788

Summary: [1.5][compiler] Invalid diagnostic with inner generic class
Product: [Eclipse Project] JDT Reporter: Tim Hanson <thanson>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.1   
Target Milestone: 3.2 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tim Hanson CLA 2005-08-23 16:24:28 EDT
Compile the example. There is a diagnostic stating that IDRefs must implement
endPacking(). If IDRefs is not nested within Lister, the example compiles fine.

As a minor point, there is also a bogus warning about BeanT being hidden within
IDRefs. Since IDRefs is static, it can't make reference to the type variables
defined by Lister.


interface Lister<BeanT, PropT, PackT> {
	void endPacking(PackT p, BeanT b, Accessor<BeanT, PropT> acc);
	
	static class IDRefs<BeanT,PropT> implements
Lister<BeanT,PropT,IDRefs<BeanT,PropT>.Pack> {
		public void endPacking(Pack p, BeanT b, Accessor<BeanT, PropT> acc) {}
		private class Pack{}
	}
}

class Accessor<BeanT, PropT>{}
Comment 1 Kent Johnson CLA 2005-10-17 16:24:14 EDT
Philippe - the method in the static member type:

public void endPacking(Pack p,...)

has a direct reference to Pack as a member type and not as a parameterized 
type.

Should it be a parameterized type instead?
Comment 2 Kent Johnson CLA 2005-11-14 13:52:10 EST
Philippe - this will be fixed with your changes to convert all 
SourceTypeBinding refs into ParameterizedType refs.
Comment 3 Philipe Mulet CLA 2005-11-15 07:10:44 EST
I confirm the problem is going away with my ongoing changes.
Added GenericTypeTest#test871
Comment 4 Philipe Mulet CLA 2005-11-16 07:36:11 EST
Fixed. Will not backport to 3.1.2, since relies on param/generic binding
unification.
Comment 5 Philipe Mulet CLA 2005-11-16 07:51:41 EST
Actually should have been closed as a dup, since no specific fix was made for
this one scenario.
Comment 6 Philipe Mulet CLA 2005-11-16 07:52:22 EST

*** This bug has been marked as a duplicate of 80472 ***
Comment 7 Frederic Fusier CLA 2005-12-13 07:48:41 EST
Verified for 3.2 M4 using build I20051213-0010