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

Bug 360145

Summary: Assignment of integer to date field should give validation error
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description broy2 CLA 2011-10-06 14:06:50 EDT
myDate date = 20081012;
Causes when run:
eglx.lang.TypeCastException The value 20,081,012 of type java.lang.Integer cannot be converted to the type org.eclipse.edt.runtime.java.eglx.lang.EDate.

I should get a validation error similar to assigning an interger to boolean.
myBoolean boolean = 1;	
Gives error:
IWN.VAL.6653.e 6/23 boolean and int are not compatible types in the expression myBoolean = 1.
Comment 1 Paul Harmon CLA 2011-10-18 14:56:32 EDT
validation has been updated to make numeric types and date incompatible
Comment 2 broy2 CLA 2011-10-20 14:21:18 EDT
Verified in 20111020 build.