Summary: | [compiler] [1.5] internal compiler reports type mismatch | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Ralf Behle <ralf.be> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | psk |
Version: | 3.1 | ||
Target Milestone: | 3.1 M5 | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Ralf Behle
2005-01-09 05:47:08 EST
The error is: ---------- 1. ERROR in C:\tests_sources\X.java (at line 6) Class<? extends Collection> c = param.getClass(); ^ Type mismatch: cannot convert from Class<? extends Object> to Class<? extends Collection> ---------- What does the last comment mean? If it means that the given example is not syntactilly correct, try runningthe example with sun's javac No. Olivier was simply pasting the offending error diagnosis we issue. It clearly is a bug in our compiler. Problem comes from the fact we didn't intercept the Object#getClass() method on this code path, and did not substitute its return type to be: "Class<? extends Collection>" in place of "Class <? extends Object>". Added regression test: GenericTypeTest#test460. Fixed Verified in I20050214 |