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

Bug 360027

Summary: Java Compile error passing decimal reference variable into a number parameter
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: jeffdouglas, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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