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

Bug 359872

Summary: Case statement with integer literals fails when incoming parameter is of type any and caller sends in Integer
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: jeffdouglas, jqian, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
driver program none

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