Bug 83799 - [1.5][Generics] regression in latest snapshot
Summary: [1.5][Generics] regression in latest snapshot
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-27 01:05 EST by R Lenard CLA
Modified: 2005-01-27 18:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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