You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a new AST object to handle Parenthesis expression, we found a bug related with the if-then-else stack.
The VTL code to test can be found in test.Bugs.GL_195_1:
B03.ANAMART_INSTRMNT_SHR_ONA_CRDTR := B03.INSTRMNT_FCT_TRNSFRRD_AMNT
[ calc SHR_ONA_CRDTR := if OTSTNDNG_NMNL_AMNT =0
then 1/ NMBR_CRDTR
else (
if OBSRVD_AGNT_CD = CRDTR_ID
then ( OTSTNDNG_NMNL_AMNT - TRNSFRRD_AMNT ) / OTSTNDNG_NMNL_AMNT
else (
if OTSTNDNG_NMNL_AMNT * NMBR_CRDTRS_NT_OA =0.0 then 1
else TRNSFRRD_AMNT / ( OTSTNDNG_NMNL_AMNT * NMBR_CRDTRS_NT_OA )
)
)
]
[ keep SHR_ONA_CRDTR ] ;
We need to focus on OTSTNDNG_NMNL_AMNT. Once we have separated the then and else values, we need now to use only these separated values in the stack in the upcoming operations. The current error is related to index 17 as OTSTNDNG_NMNL_AMNT is 0. This index should not appear on the nested if as it will raise a DivisionByZero error.
Task to perform
Review the current implementation of if-then-else stack
Generate a new test that is similar to this (nested if uses different components than principal if) but with smaller names on the components (adhere to Id_1, Me_1 convention).
The text was updated successfully, but these errors were encountered:
Overview
When adding a new AST object to handle Parenthesis expression, we found a bug related with the if-then-else stack.
The VTL code to test can be found in test.Bugs.GL_195_1:
We need to focus on OTSTNDNG_NMNL_AMNT. Once we have separated the then and else values, we need now to use only these separated values in the stack in the upcoming operations. The current error is related to index 17 as OTSTNDNG_NMNL_AMNT is 0. This index should not appear on the nested if as it will raise a DivisionByZero error.
Task to perform
The text was updated successfully, but these errors were encountered: