Changeset 12822


Ignore:
Timestamp:
May 17, 2019 2:09:47 PM (7 months ago)
Author:
Zimon Kuhs
Message:

#4734

Improved error message for when the reinit() operator is used in the wrong place.

Location:
trunk/Compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/ModelicaFrontEnd/src/jastadd/errorcheck/ContentsCheck.jadd

    r12614 r12822  
    7474    public void FReinit.contentCheck(ErrorCheckType checkType) {
    7575        if (!inWhen() || inAlgorithm())
    76             error("The reinit() operator is only allowed in when equations");
     76            error("The reinit() operator is only allowed in when clauses that are within an equation section.");
    7777    }
    7878   
  • trunk/Compiler/ModelicaMiddleEnd/test/modelica/WhenTests.mo

    r10783 r12822  
    31311 errors found:
    3232
    33 Error at line 5, column 2, in file 'Compiler/ModelicaMiddleEnd/test/modelica/WhenTests.mo':
    34   The reinit() operator is only allowed in when equations
     33Error at line 5, column 2, in file '...':
     34  The reinit() operator is only allowed in when clauses that are within an equation section.
    3535")})));
    3636end ReinitErr1;
     
    2502501 errors found:
    251251
    252 Error at line 7, column 9, in file 'Compiler/ModelicaMiddleEnd/test/modelica/WhenTests.mo':
    253   The reinit() operator is only allowed in when equations
     252Error at line 7, column 9, in file '...':
     253  The reinit() operator is only allowed in when clauses that are within an equation section.
    254254")})));
    255255end ReinitErr11;
Note: See TracChangeset for help on using the changeset viewer.