- 
                Notifications
    You must be signed in to change notification settings 
- Fork 25
Closed
Labels
BugCobolUser VisibleVisible by the end user. Useful to priorize issueVisible by the end user. Useful to priorize issue
Milestone
Description
Describe the bug
Our check "A Cobol statement cannot be across 2 sources files (eg. Main program and a COPY)" have a problem with replace inside COPY.
The following code should be ok for our parser and doesn't mix a statement across source file.
To Reproduce
(Type)Cobol code that cause the bug :
       IDENTIFICATION division.
       PROGRAM-ID. MyPGM.
       data division.
       working-storage section.
       01 Var1-foo pic X.
      
       procedure division.
      
              replace ==:field:== by ==foo==.
              copy MyCopy.
      
           goback.
       end program MyPGM.MyCopy.cpy
000070     if Var1-:field: not = space
000080         display "hello"
000590     end-if                                                       We get the error
"A Cobol statement cannot be across 2 sources files (eg. Main program and a COPY)"
Expected behavior
No error
Metadata
Metadata
Assignees
Labels
BugCobolUser VisibleVisible by the end user. Useful to priorize issueVisible by the end user. Useful to priorize issue