Bug 82349 - [compiler][1.5] Problems deriving from generic class that uses inner classes
Summary: [compiler][1.5] Problems deriving from generic class that uses inner classes
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 81576 83993 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-06 14:32 EST by Kory Markevich CLA
Modified: 2005-02-15 07:19 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kory Markevich CLA 2005-01-06 14:32:14 EST
The following code in 3.1M4:

class Base< T >
{
    public class Inner { }
    
    Inner a;
}

class Derived extends Base< Integer >
{
    class DerivedInner extends Inner { }
    
    Derived( )
    {
        a = new DerivedInner( );
    }
}

Results in a "Type mismatch: cannot convert from Derived.DerivedInner to
Base<T>.Inner" error.  Compiles fine with javac.
Comment 1 Philipe Mulet CLA 2005-01-28 15:22:52 EST
We did not substitute the enclosing type of Inner when inheriting 'a' field
through Base<Integer>. 

Added GenericTypeTest#test484-486.
Fixed
Comment 2 Philipe Mulet CLA 2005-01-30 03:03:56 EST
*** Bug 83993 has been marked as a duplicate of this bug. ***
Comment 3 Philipe Mulet CLA 2005-02-03 04:48:31 EST
*** Bug 81576 has been marked as a duplicate of this bug. ***
Comment 4 Jerome Lanneluc CLA 2005-02-15 07:19:09 EST
Verified in I20050214