Bug 73251 - [1.5] Unexpected error message inside 'for'
Summary: [1.5] Unexpected error message inside 'for'
Status: RESOLVED WORKSFORME
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: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-03 11:22 EDT by David Audel CLA
Modified: 2004-11-03 09:45 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 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