Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326853

Summary: enhance TypeUtils.isAssignableFrom to consider parameterized types
Product: z_Archived Reporter: Henrik Lindberg <henrik.lindberg>
Component: b3Assignee: Project Inbox <b3.engine-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Henrik Lindberg CLA 2010-10-02 19:52:42 EDT
The current implementation of TypeUtils.isAssignableFrom(Type base, Type from) is too simplistic as it does not consider parameterized types.
Comment 1 Henrik Lindberg CLA 2010-10-02 19:54:57 EDT
Fixed in revision 1323.

Raw assignment is allowed if lhs is raw or has erased type parameters.
If lhs has type parameters rhs must have the same number of type parameters and each must be assignable to the corresponding lhs parameter.