Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360145 - Assignment of integer to date field should give validation error
Summary: Assignment of integer to date field should give validation error
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-06 14:06 EDT by broy2 CLA
Modified: 2017-02-23 14:18 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.