Bug 75525 - [1.5] Inner class import does not work with generic classes
Summary: [1.5] Inner class import does not work with generic classes
Status: RESOLVED DUPLICATE of bug 75134
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-02 14:49 EDT by Artur Biesiadowski CLA
Modified: 2004-10-29 13:04 EDT (History)
0 users

See Also:


Attachments

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