diff --git a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/move_a.kt b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/move_a.kt index 6eb12f437..a27cf5d25 100644 --- a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/move_a.kt +++ b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/move_a.kt @@ -123,7 +123,7 @@ private fun moveaDataStructure( value: Expression ): DataStructValue { if (value is DataRefExpr && value.variable.referred?.type is ArrayType && (value.variable.referred?.type as ArrayType).element is NumberType) { - throw IllegalStateException("Factor 2 and Result aren't same type: ${value.render()} (${value.position})") + throw IllegalStateException("You cannot move a numeric array into a DS: ${value.render()} (${value.position})") } val targetValue: DataStructValue = interpreterCore.eval(target) as DataStructValue diff --git a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/interpreter/JarikoCallbackTest.kt b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/interpreter/JarikoCallbackTest.kt index 6851cc52a..a6332a9d6 100644 --- a/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/interpreter/JarikoCallbackTest.kt +++ b/rpgJavaInterpreter-core/src/test/kotlin/com/smeup/rpgparser/interpreter/JarikoCallbackTest.kt @@ -1048,7 +1048,7 @@ class JarikoCallbackTest : AbstractTest() { @Test fun executeERROR52CallBackTest() { executePgmCallBackTest("ERROR52", SourceReferenceType.Program, "ERROR52", mapOf( - 13 to "Factor 2 and Result aren't same type: SCAATT (Position(start=Line 13, Column 35, end=Line 13, Column 43))" + 13 to "You cannot move a numeric array into a DS: SCAATT (Position(start=Line 13, Column 35, end=Line 13, Column 41))" )) } diff --git a/rpgJavaInterpreter-core/src/test/resources/ERROR52.rpgle b/rpgJavaInterpreter-core/src/test/resources/ERROR52.rpgle index a3fce1adf..a673ce74b 100644 --- a/rpgJavaInterpreter-core/src/test/resources/ERROR52.rpgle +++ b/rpgJavaInterpreter-core/src/test/resources/ERROR52.rpgle @@ -2,7 +2,7 @@ D* 06/02/25 D* Purpose: Must fire the following errors during execution of D* `C MOVEA SCAATT SCAATTDS`: - D* line 19 - "Factor 2 and Result aren't same type" + D* line 13 - "You cannot move a numeric array into a DS" D* because isn't possible to assign Standalone defined D* as number to a DS. V* ==============================================================