Summary: | [compiler] Compilation error 'incompatible types' should use full qualified class names | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Bauke Scholtz <balusc> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | marcin.kowalski.pl, Olivier_Thomann, philippe_mulet | ||||
Version: | 3.4 | ||||||
Target Milestone: | 3.5 M1 | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Bauke Scholtz
2008-07-23 13:06:43 EDT
I would say we should use fully qualified name only when the simple names are identical. This would keep the messages shorter in most cases. Also good. That's always better than nothing. Created attachment 108255 [details]
Proposed fix
Probably need to update some regression tests.
Released for 3.5M1. Added regression test org.eclipse.jdt.core.tests.compiler.regression.AssignmentTest#test61 Great, thank you. No problem. You can check next integration build to see if this is what you expected. Verified for 3.5M1 using I20080805-1307 I believe there are other problem scenarii where names should be disambiguated (other flavors of incompatible types) as well. *** Bug 192856 has been marked as a duplicate of this bug. *** e.g. public class X { class Member {} void foo() { new p.X().new Member(); } } e.g. public class X extends Throwable { public void foo() throws p.X {} } e.g. public class X extends Throwable { void foo() throws X { throw new p.X(); } } Also senders of ProblemReporter methods: incompatibleExceptionInThrowsClause(...) incompatibleReturnType(...) invalidEnclosingType(...) javadoc counterparts unsafeCast(...) unsafeTypeConversion(...) etc. Ok, I'll take a look. |