Bug 79612 - ClassCastException on referenceTypeBinding.isEqualTo(primitiveTypeBinding)
Summary: ClassCastException on referenceTypeBinding.isEqualTo(primitiveTypeBinding)
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-26 20:48 EST by Markus Keller CLA
Modified: 2004-12-15 07:45 EST (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 2004-11-26 20:48:08 EST
ClassCastException on referenceTypeBinding.isEqualTo(primitiveTypeBinding):

public class Test2 {
    Integer a;
    int b;
}

integerBinding.isEqualTo(intBinding) => Log:

java.lang.ClassCastException:
org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding incompatible with
org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding
	at org.eclipse.jdt.core.dom.BindingComparator.isEqual(BindingComparator.java:183)
	at org.eclipse.jdt.core.dom.BindingComparator.isEqual(BindingComparator.java:236)
	at org.eclipse.jdt.core.dom.TypeBinding.isEqualTo(TypeBinding.java:796)
...
Comment 1 Olivier Thomann CLA 2004-11-27 17:39:57 EST
Fixed and released in HEAD.
Regression test added in ASTConverter15Test.test0084.
Comment 2 Jerome Lanneluc CLA 2004-12-15 07:45:12 EST
Verified (in I20041214-2000) that the test ensures that the 2 types are not
equal (without throwing a ClassCastException)