Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363608 - No validation message using as number inline for an OUT modified parameter
Summary: No validation message using as number inline for an OUT modified parameter
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-11-11 13:33 EST by Kathy Carroll CLA
Modified: 2017-02-23 14:17 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 Kathy Carroll CLA 2011-11-11 13:33:12 EST
Given this

Only expressions that are valid on the left hand side of an assignment statement are valid to be passed to an INOUT or OUT function parameter. Some of the things that RBD allows to be passed to an INOUT parm, for instance are: AS expressions, New expressions,  unary expressions (such as -myInt). Valid expressions are things like simple name, qualified name, array access and dynamic access.

I would expect a validation error for this code:

    function testFunctionParameterOutWithUpdateNum005() {@Test}
    	details = "Cannot instantiate the type ENumber";
    	localDec decimal(5,2) = 333.33;
    	updated decimal(5,2) = 543.21;
	updateOutParameterNum005(localDec as number);
	LogResult.assertTrue1( localDec == updated);

    end	    
    
    function updateOutParameterNum005(localLen number out)
    	localLen = 543.21;
    end
Comment 1 Paul Harmon CLA 2011-11-14 10:02:02 EST
For some reason, some old logic in FunctionArgumentValidator was short circuiting the valiation checks if the parm and argument were  both reference types.

I have removed this old (bogus) logic and now the validation behaves correctly.
Comment 2 Kathy Carroll CLA 2011-11-15 07:33:55 EST
verfied with 20111114_2101 and closed