Bug 128562 - Javadoc of ITypeBinding#isAssignmentCompatible() is unclear
Summary: Javadoc of ITypeBinding#isAssignmentCompatible() is unclear
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-19 18:56 EST by Markus Keller CLA
Modified: 2006-04-13 12:39 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2006-02-19 18:56:05 EST
I20060217-1115

The javadoc of ITypeBinding#isAssignmentCompatible() is not as crystal clear as it could be. The term "compatible" suggests that the relation is bidirectional, which is clearly not the case. Furthermore, JLS3 5.2 only defines assignment "conversion", not "compatibility".

A definition like this would make things much clearer (and would correct the typo in "assigment"):

/**
 * Returns whether an expression of this type can be assigned to a variable
 * of the given type, as specified in section 5.2 of <em>The Java Language 
 * Specification, Third Edition</em> (JLS3).
 * 
 * @param variableType the type of a variable to check compatibility against
 * @return <code>true</code> if an expression of this type can be assigned to a
 *   variable of the given type, and <code>false</code> otherwise
 * @since 3.1
 */
public boolean isAssignmentCompatible(ITypeBinding variableType);
Comment 1 Philipe Mulet CLA 2006-02-20 08:03:48 EST
Assignment is not a bidirectional relation; but improving doc is good if it is not super clear.

Comment 2 Philipe Mulet CLA 2006-04-06 08:54:48 EDT
+1 for 3.2RC1
Comment 3 Jerome Lanneluc CLA 2006-04-06 11:24:04 EDT
Released proposed change.
Comment 4 Frederic Fusier CLA 2006-04-13 12:39:05 EDT
Verified for 3.2 RC1 using build I20060413-0010.