Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359872 - Case statement with integer literals fails when incoming parameter is of type any and caller sends in Integer
Summary: Case statement with integer literals fails when incoming parameter is of type...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 12:37 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:14 EST (History)
3 users (show)

See Also:


Attachments
driver program (2.28 KB, application/octet-stream)
2011-10-04 12:37 EDT, Kathy Carroll CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Carroll CLA 2011-10-04 12:37:00 EDT
Created attachment 204525 [details]
driver program

Case statement with integer literals fails when incoming parameter is of type any and caller sends in Integer.

This works in RBD.

See attached program
Comment 1 Jeff Douglas CLA 2011-10-20 14:30:25 EDT
I had a long talk with Tim and this is actually invalid. We are changing this over to validation to prevent it from happening.

The problem is that the CASE (or IF) statement is allowing an Any to be compared to another type (short), without casting the any. It should have been coded like this:

case(incoming as int)

or 

case(incoming as short)

Tim wants to discuss this further.
Comment 2 Paul Harmon CLA 2011-11-04 14:57:03 EDT
After discussing this with Tim, we decided that this should actually work.

I have updated the following java runtime classes for this:

AnyDelegate
AnyEnumeration
EAny
ENumber
Comment 3 Kathy Carroll CLA 2011-11-11 13:43:13 EST
verified with 20111111_0901 & closed