Bug 105580

Summary: Possibly Misleading Type mismatch error message
Product: [Tools] AspectJ Reporter: Bill Napier <Bill.Napier>
Component: CompilerAssignee: Andrew J Huff <disabled>
Status: NEW --- QA Contact:
Severity: trivial    
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Bill Napier CLA 2005-07-29 11:56:24 EDT
With 2 classes a.C1 and b.C1, the following line:

a.C1 a = new b.C1();

yields this error message:

Type mismatch: cannot convert from C1 to C1.

While in this case it is pretty obvious what the problem is, but we came across
this problem when using a external API (Type mismatch: cannont convert from
Iterator to Iterator).

A simple fix would be to test for the case when the shortened name of both
classes are the same and instead give the full package name.  For example:

Type mismatch: cannot convert from b.C1 to a.C1.
Comment 1 Adrian Colyer CLA 2005-08-01 04:09:53 EDT
Andrew, this is a nice self-contained bug report you could possibly take a look
at please.
Comment 2 Andrew J Huff CLA 2005-08-01 06:06:20 EDT
Found this in JDT for eclipse 3.1.0 final, so I've raised it as bug 105658 in JDT.