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

Bug 363919

Summary: Should issue validation error when passing value type to reference inout/out parameters for service call invokation
Product: z_Archived Reporter: Jing Qian <jqian>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jing Qian CLA 2011-11-16 10:02:15 EST
The service function is defined as
function timestamp_inoutparm (p timestamp inout)
    p = "2005/02/15-12:35:11";
end

But when calling the service the parameter type is timestamp("yyyyMMddHHmmss")
 timestamp1 timestamp("yyyyMMddHHmmss") = "19990101010101";        
 call getPrimitiveService().timestamp_inoutParm(timestamp1) returning to
verifyTimestamp_inoutParm onException handleServiceException;

If you try such case in a handler by direct function call, it may produce
compile error. Sample code:
    function start()
        timestamp1 timestamp("yyyyMMddHHmmss") = "19990101010101";
        timestamp_inoutparm(timestamp1);
    end

    function timestamp_inoutparm (p timestamp inout)
           p = "2005/02/15-12:35:11";
      end


If it is invalid, we need to have validation for services invocation as well
Comment 1 Lisa Lasher CLA 2011-11-16 16:28:11 EST
Paul, this is still a candidate to fix this week, if the fix is safe.  be sure to run eunit before committing.
Comment 2 Paul Harmon CLA 2011-11-18 16:54:19 EST
This validation was done in RBD already, but when the call service code was refactored in EDT, the call to the function argument validatoin was commented out. I have fixed this with changes to the following classes:

DefaultBinder
FunctionArgumentValidator
ServicesActionStatementValidator
Comment 3 Jing Qian CLA 2011-11-21 13:39:40 EST
verified with 201111202101's build