Bug 75525

Summary: [1.5] Inner class import does not work with generic classes
Product: [Eclipse Project] JDT Reporter: Artur Biesiadowski <abies>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Artur Biesiadowski CLA 2004-10-02 14:49:30 EDT
Following code should work, but it doesn't compile with error "Type mismatch:
cannot convert from new Iterator<Map.Entry<String,Integer>>(){} to
Iterator<Map.Entry<String,Integer>>"

---------------------------------------

import java.util.AbstractSet;
import java.util.Iterator;
import java.util.Map.Entry;

public class GenTest extends AbstractSet<Entry<String,Integer>> {

	public Iterator<Entry<String, Integer>> iterator() {
		return new Iterator<Entry<String,Integer>>() {
			public boolean hasNext() {return false;}
			public Entry<String, Integer> next() {return null;}
			public void remove() {}	
		};
	}
	
	public int size() {return 0;}
}

---------------------------------------

It might be related to #75134 - but I have no way to determine if this is
exactly the same problem.
Comment 1 Frederic Fusier CLA 2004-10-27 12:13:34 EDT
Verified it works works with last integration build: I200410260800...

*** This bug has been marked as a duplicate of 75134 ***
Comment 2 Frederic Fusier CLA 2004-10-29 13:04:34 EDT
Test case test361 added in GenericTypeTest