Skip to content

Compiling COBOL programs whose program-id are MAIN fails #333

@yutaro-sakamoto

Description

@yutaro-sakamoto

Compiling the following program fails because duplicated variable are declared in Java programs.
It seems that this error occurs only if the program-id is MAIN.

       IDENTIFICATION          DIVISION.
       PROGRAM-ID.             MAIN.
       ENVIRONMENT             DIVISION.
       CONFIGURATION           SECTION.
       DATA                    DIVISION.
       WORKING-STORAGE SECTION.
       PROCEDURE DIVISION.
       DISPLAY "hello".
./MAIN.java:202: error: variable l_MAIN is already defined in class MAIN
  private final static int l_MAIN = 2;

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions