Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling TAG when is in composed statements #635

Merged

Conversation

GaetanoDiNatale
Copy link
Contributor

@GaetanoDiNatale GaetanoDiNatale commented Oct 11, 2024

Description

This work fixes the GOTO to a TAG declared under nested body. For example:

     C     FOO           IFEQ      BAR
     C     ... 
     C     JUMP          TAG
     C     ...
     C                   ENDIF     
     ...
     C                   GOTO      JUMP
     ...

Technical notes

In Jariko, that GOTO causes #Cannot invoke "String.length()" because "str" is null with a com.smeup.rpgparser.interpreter.GotoException. To achieve the purpose of this PR, I have made the change on internal_interpreter by making an explosion of statements for the individuation of desired TAG.

Related to #LS24004437

Checklist:

  • If this feature involves RPGLE fixes or improvements, they are well-described in the summary.
  • There are tests for this feature.
  • RPGLE code used for tests is easily understandable and includes comments that clarify the purpose of this feature.
  • The code follows Kotlin conventions (run ./gradlew ktlintCheck).
  • The code passes all tests (run ./gradlew check).
  • Relevant documentation is included in the docs directory.

@davidepalladino-apuliasoft davidepalladino-apuliasoft changed the title fix handling of composed statements Fix handling TAG when is in composed statements Oct 15, 2024
Copy link
Collaborator

@lanarimarco lanarimarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@lanarimarco lanarimarco merged commit 5f52c4d into develop Oct 16, 2024
1 check passed
@lanarimarco lanarimarco deleted the bugfix/LS24004437/flattening-of-statements-GOTO-exception branch October 16, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants