Bug 106514 - [1.5][compiler] Improve diagnostic on bound mismatch for GenericTypeTests.test790
Summary: [1.5][compiler] Improve diagnostic on bound mismatch for GenericTypeTests.tes...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-09 12:27 EDT by Maxime Daniel CLA
Modified: 2005-09-26 11:02 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Daniel CLA 2005-08-09 12:27:35 EDT
(Fup on bug 103485)

While bug 103485 is fixed with 3.2 M1 (we definitely have an error diagnostic 
now), the message is a bit difficult to understand, since it does not cite the 
effective types of the arguments, but complex types yield by the validation 
and capture algorithm, which relationship to the arguments is not easy to 
grasp.

Philippe's suggestion for an improved message:
Bound mismatch: The generic method isGreater(T, T) of type Hover is not 
applicable for the arguments (Integer, Double) since the type 
Number&Comparable<?> is not a valid substitute for the bounded parameter <T 
extends Comparable<T>>
(maybe even without the since... part of it)
Comment 1 Markus Keller CLA 2005-08-10 10:07:46 EDT
I would prefer the full message. When I as a user have errors because the
compiler could not infer a good type, then I'm in trouble anyway. In that
situation, the additional information about the inferred type could help me find
out why it didn't work.
Comment 2 Robert M. Fuhrer CLA 2005-08-10 13:09:47 EDT
I'd definitely prefer to see the full information (as Markus says, to help in
diagnosing the cause), assuming that the message identifies the actual argument
types as proposed.
Comment 3 Philipe Mulet CLA 2005-08-11 06:01:52 EDT
Glad to see these responses. Will keep detailed message.
Releasing for 3.1.1 (and 3.2).
Comment 4 Philipe Mulet CLA 2005-08-11 06:02:35 EDT
Updated various GenericTypeTest cases where the message was less than optimal.
Comment 5 David Audel CLA 2005-09-21 10:34:32 EDT
Verified in I20050921-0010 for 3.2M2
Comment 6 David Audel CLA 2005-09-26 11:02:39 EDT
Verified using M20050923-1430 for 3.1.1