Bug 83799

Summary: [1.5][Generics] regression in latest snapshot
Product: [Eclipse Project] JDT Reporter: R Lenard <rlenard>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description R Lenard CLA 2005-01-27 01:05:57 EST
The snapshot from this week has regressed with this code
% cat Test.java
public final class Test
{
    public <T> void testEquals(final String x, T one, T two)
    {
        
    }
    
    public <T1, T2> void testEqualsAlt(final String x, T1 one, T2 two)
    {
        
    }
    
    public interface Fooey {
        
    };
    
    public interface Bar extends Fooey {
        
    };
    
    public interface GenericFooey<T> {
        
    };
    
    public interface GenericBar<T> extends GenericFooey<T> {
        
    };
    
    public void testGeneric() {
        testEquals("Should work", new GenericBar<Long>() {}, new 
GenericBar<Long>() {});
        final GenericBar<Long> child = new GenericBar<Long>() {};
        final GenericFooey<Long> parent = child;
        testEquals("Doesn't work but should", child, parent); // this fails but 
should work it's identical to next line.
        testEquals("Doesn't work but should", (GenericFooey<Long>)child, 
parent);
        testEqualsAlt("Should work", child, parent);
    }

    public void test() {
        testEquals("Should work", new Bar() {}, new Bar() {});
        final Bar child = new Bar() {};
        final Fooey parent = child;
        testEquals("Doesn't work but should", child, parent);
        testEquals("Doesn't work but should", (Fooey)child, parent);
        testEqualsAlt("Should work", child, parent);
    }
}

Previously this would compile fine.   Now it gives an erroneous error trying to 
resolve the testEquals method
Comment 1 Philipe Mulet CLA 2005-01-27 18:17:53 EST
Added regression test: GenericTypeTest#test482.
Cannot reproduce any failure using HEAD contents.

Closing