-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #592 from smeup/refactor/LS24003753/function-call-…
…to-array-access-recursive
- Loading branch information
Showing
5 changed files
with
66 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
rpgJavaInterpreter-core/src/test/resources/smeup/MUDRNRAPU00244.rpgle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
* Helper declarations | ||
D £DBG_Str S 2 | ||
|
||
* Declarations needed for test purpose | ||
D £C6JDSO DS 512 | ||
D £C6JO_TO 2 0 DIM(10) | ||
D $X S 5 0 | ||
D §§IMPO S 6 0 | ||
D T$AG_I S 21 6 DIM(15) | ||
|
||
* Initializing array indices to avoid null value exception | ||
C EVAL $X=2 | ||
C EVAL £C6JO_TO($X)=2 | ||
|
||
* Trying to access an array while accessing another array (like £C6JO_TO($X) inside T$AG_I). | ||
* £C6JO_TO($X) should not be seen as a function call but as an array access. | ||
* This should be true when this kind of array access is contained in any type expression. | ||
C EVAL T$AG_I(£C6JO_TO($X))= | ||
C T$AG_I(£C6JO_TO($X))+§§IMPO | ||
|
||
* Test output | ||
C EVAL £DBG_Str='ok' | ||
C £DBG_Str DSPLY |