Bug 73251

Summary: [1.5] Unexpected error message inside 'for'
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description David Audel CLA 2004-09-03 11:22:49 EDT
build I20040901

1) create Y.java
package p;
import java.util.Collection;
public class Y {
  public Collection<String> get() {
    return null;
  }
}

2) create X.java
import p.Y;

public class X {
  void foo(Y y) {
    for(String s : y.get()) {
    }
  }
}

There is no error message inside Problem window but an error is shown inside 
the java editor of Y.java ("Type mismatch: cannot convert from element type 
Object to String")
Comment 1 Jerome Lanneluc CLA 2004-11-03 09:45:04 EST
Verified this now works with I200411022000