Open fm-117 opened 2 years ago
Looks like an incremental bug. Could not reproduce bug with private source code captured by logging...
This can be reproduced with following source code:
IDENTIFICATION DIVISION.
PROGRAM-ID. TCOFM117.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Group1.
05 Array1 OCCURS 60 TIMES
INDEXED BY MyIndex.
10 Array1-Elt1 PIC X(03).
PROCEDURE DIVISION.
SEARCH Array1 VARYING MyIndex
at end
END-SEARCH
.
IDENTIFICATION DIVISION.
PROGRAM-ID. Nested.
END PROGRAM Nested.
END PROGRAM TCOFM117.
Same problem as in #2434 and fixed with #2436.
Keeping the issue open as the bug could happen with other unsupported constructs.
Issue has occurred again with parser 1.6.5 (additional information available in our internal issue tracking system WI 214934).
Describe the bug In some cases, nested program is not correctly attached to its parent program but to a paragraph instead.
To Reproduce
Expected behavior Correct AST, parent node of a NestedProgram is expected to be a Program object.
Technical
How to test automatically Standard program test.