Changeset 13912


Ignore:
Timestamp:
Oct 30, 2019 3:47:39 PM (3 weeks ago)
Author:
molsson
Message:

#5843 Updated error message NON_BOOLEAN_CONDITIONAL_GUARD to say Boolean instead of boolean.

Location:
branches/dev-mo-2617/Compiler/ModelicaFrontEnd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-mo-2617/Compiler/ModelicaFrontEnd/src/jastadd/errorcheck/TypeCheck.jrag

    r13898 r13912  
    195195    public static final SimpleProblemProducer ASTNode.NON_BOOLEAN_CONDITIONAL_GUARD =
    196196            new SimpleErrorProducer("NON_BOOLEAN_CONDITIONAL_GUARD", ProblemKind.SEMANTIC,
    197                     "The guard expression of a conditional component should be a boolean expression");
     197                    "The guard expression of a conditional component should be a Boolean expression");
    198198    public static final SimpleProblemProducer ASTNode.NON_FIXED_CONDITIONAL_GUARD =
    199199            new SimpleErrorProducer("NON_FIXED_CONDITIONAL_GUARD", ProblemKind.SEMANTIC,
  • branches/dev-mo-2617/Compiler/ModelicaFrontEnd/test/modelica/NameTests.mo

    r13898 r13912  
    30163016  parameter Real x = 1 if 1;
    30173017
    3018     annotation(__JModelica(UnitTesting(tests={
    3019         ErrorTestCase(
    3020             name="ConditionalComponentTest1_Err",
    3021             description="Test of type checking of conditional components.",
    3022             errorMessage="
    3023 1 errors found:
    3024 
    3025 Error at line 2, column 3, in file 'Compiler/ModelicaFrontEnd/test/modelica/NameTests.mo', NON_BOOLEAN_CONDITIONAL_GUARD:
    3026   The guard expression of a conditional component should be a boolean expression
     3018annotation(__JModelica(UnitTesting(tests={
     3019    ErrorTestCase(
     3020        name="ConditionalComponentTest1_Err",
     3021        description="Test of type checking of conditional components.",
     3022        errorMessage="
     3023
     3024
     3025Error at line 2, column 3, in file '...', NON_BOOLEAN_CONDITIONAL_GUARD:
     3026  The guard expression of a conditional component should be a Boolean expression
    30273027")})));
    30283028end ConditionalComponentTest1_Err;
     
    30483048  parameter Real x = 1 if b;
    30493049
    3050     annotation(__JModelica(UnitTesting(tests={
    3051         ErrorTestCase(
    3052             name="ConditionalComponentTest3_Err",
    3053             description="Test of type checking of conditional components.",
    3054             errorMessage="
    3055 2 errors found:
    3056 
    3057 Error at line 3, column 3, in file 'Compiler/ModelicaFrontEnd/test/modelica/NameTests.mo', NON_BOOLEAN_CONDITIONAL_GUARD:
    3058   The guard expression of a conditional component should be a boolean expression
    3059 
    3060 Error at line 3, column 3, in file 'Compiler/ModelicaFrontEnd/test/modelica/NameTests.mo', NON_SCALAR_CONDITIONAL_GUARD:
     3050annotation(__JModelica(UnitTesting(tests={
     3051    ErrorTestCase(
     3052        name="ConditionalComponentTest3_Err",
     3053        description="Test of type checking of conditional components.",
     3054        errorMessage="
     3055
     3056
     3057Error at line 3, column 3, in file '...', NON_BOOLEAN_CONDITIONAL_GUARD:
     3058  The guard expression of a conditional component should be a Boolean expression
     3059
     3060Error at line 3, column 3, in file '...', NON_SCALAR_CONDITIONAL_GUARD:
    30613061  The guard expression of a conditional component should be a scalar expression
    30623062")})));
     
    33913391annotation(__JModelica(UnitTesting(tests={
    33923392    ErrorTestCase(
     3393        name="ConditionalComponentTest15_Err",
    33933394        description="Test of type checking of conditional composite component.",
    33943395        errorMessage="
    3395 2 errors found:
    3396 
    3397 Error at line 7, column 5, in file 'Compiler/ModelicaFrontEnd/test/modelica/NameTests.mo', NON_BOOLEAN_CONDITIONAL_GUARD:
    3398   The guard expression of a conditional component should be a boolean expression
    3399 
    3400 Error at line 7, column 5, in file 'Compiler/ModelicaFrontEnd/test/modelica/NameTests.mo', NON_SCALAR_CONDITIONAL_GUARD:
     3396
     3397
     3398Error at line 7, column 5, in file '...', NON_BOOLEAN_CONDITIONAL_GUARD:
     3399  The guard expression of a conditional component should be a Boolean expression
     3400
     3401Error at line 7, column 5, in file '...', NON_SCALAR_CONDITIONAL_GUARD:
    34013402  The guard expression of a conditional component should be a scalar expression
    34023403")})));
Note: See TracChangeset for help on using the changeset viewer.