Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360027 - Java Compile error passing decimal reference variable into a number parameter
Summary: Java Compile error passing decimal reference variable into a number parameter
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-05 15:58 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:15 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Carroll CLA 2011-10-05 15:58:34 EDT
This egl code produces java error

function testFunctionParameterIn1() {@Test}
	toggleValue = 1;
	localDec decimal = 111.11;
        switchOnInParameter(localDec);
end	

function switchOnInParameter(localLen number in)
    	resolved int = -1;
        case(localLen)
            when(111.11)
                resolved = 1;
            when(222.22)
                resolved = 2;
            otherwise
                resolved = 3;
        end
        LogResult.assertTrue1(resolved == toggleValue);
        toggleValue = 0;
end

The method switchOnInParameter(ENumber) in the type GenericParameters is not applicable for the arguments (BigDecimal)

However this compiles and executes as desired

function testFunctionParameterIn2() {@Test}
        toggleValue = 1;
	localDec decimal(5,2) = 111.11;
        switchOnInParameter(localDec);
end
Comment 1 Jeff Douglas CLA 2011-10-20 13:29:56 EDT
fixed
Comment 2 Kathy Carroll CLA 2011-10-21 12:28:19 EDT
Verfied with 201110210902 & closed