Bug 186833 - [1.5][compiler] Should detect member supertype cycle when resolved thru static import
Summary: [1.5][compiler] Should detect member supertype cycle when resolved thru stati...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 RC1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-14 12:38 EDT by Philipe Mulet CLA
Modified: 2007-05-16 07:29 EDT (History)
0 users

See Also:
philippe_mulet: review+


Attachments
Proposed patch (3.65 KB, patch)
2007-05-14 16:37 EDT, Kent Johnson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2007-05-14 12:38:22 EDT
Build 3.3rc0

We should report a supertype cycle for the following case:
package p;
import p.X.Super;
import static p.Top.*;
class Top<T> {	
  static class A<U> {}
}
public class X extends Super<A<X>> {	
  static class Super<T> extends Top<T>{	}
}
Comment 1 Philipe Mulet CLA 2007-05-14 12:38:56 EDT
Added GenericTypeTest#test1139 & 1141
Comment 2 Kent Johnson CLA 2007-05-14 12:45:11 EDT
Even simpler case that fails in 1.4 with a cycle error :

package p;

import p.X.Super;

public class X extends Super {    
	static class Super { }
}
Comment 3 Kent Johnson CLA 2007-05-14 16:37:46 EDT
Created attachment 67130 [details]
Proposed patch
Comment 4 Philipe Mulet CLA 2007-05-15 04:20:28 EDT
Patch looks good. 
Comment 5 Kent Johnson CLA 2007-05-15 10:38:21 EDT
Released into HEAD for 3.3RC1
Comment 6 Eric Jodet CLA 2007-05-16 06:02:48 EDT
Verified for 3.3 RC1 using build I20070516-0010