sonar-openedge icon indicating copy to clipboard operation
sonar-openedge copied to clipboard

Check INPUT-OUTPUT datatype

Open dominickdm opened this issue 6 years ago • 1 comments

In a procedure we have the following RUN-statement:

IF NOT AVAILABLE b_Action 
THEN RUN CreateAction(b_Result.rslt_Object, b_Result.rslt_ObjectTime, b_Result.rslt_Specimen,
                        wb_SelectedOutput.out_Procedure, wb_SelectedOutput.out_MaterialInput, BUFFER b_Action).
...

Beyond the same procedure, the implementation of the CreateAction-procedure can be found:

PROCEDURE CreateAction PRIVATE:
    DEFINE INPUT PARAMETER ObjectId AS INTEGER NO-UNDO.
    DEFINE INPUT PARAMETER ObjectTime AS INTEGER NO-UNDO.
    DEFINE INPUT PARAMETER SpecimenId AS INTEGER NO-UNDO.
    DEFINE INPUT PARAMETER ProcedureId AS INTEGER NO-UNDO.
    DEFINE INPUT PARAMETER MaterialInputId AS INTEGER NO-UNDO.
    DEFINE PARAMETER BUFFER b_Action FOR Action.
  • b_Result.rslt_ObjectTime is a database field defined as a DECIMAL
  • Input parameter ObjectTime is defined as INTEGER

=> No need to say that this could create strange error's

If this kind of bug could be noticed by SQ, we will be very happy.

dominickdm avatar Sep 13 '18 10:09 dominickdm

Very good idea, but must wait for the ANTLR4 transition to be completed. Hopefully, that should be around December.

gquerret avatar Sep 14 '18 07:09 gquerret