Ignore:
Timestamp:
Oct 31, 2019 2:22:32 PM (6 weeks ago)
Author:
molsson
Message:

Merged revision(s) 13898-13913 from branches/dev-mo-2617:
#5843 Moved type checking of conditional attributes so that it is always done.
........
#5843 Conditional attribute requires variability fixed parameter or less.
........
#5843 Updated error message NON_BOOLEAN_CONDITIONAL_GUARD to say Boolean instead of boolean.
........
#5843 Merged non-scalar and non-boolean conditional guard error messages.
........

Location:
branches/dev-mo-2530
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-mo-2530

  • branches/dev-mo-2530/Compiler/ModelicaFrontEnd/src/jastadd/errorcheck/ErrorCheck.jrag

    r13103 r13922  
    852852                    getFArraySubscripts().collectErrors(checkType);
    853853                }
    854                 if (hasConditionalAttribute())  {
    855                     getConditionalAttribute().collectErrors(checkType);
     854                if (hasConditionalAttribute()) {
     855                    FExp cond = getConditionalAttribute();
     856                    cond.collectErrors(checkType);
     857                    if (!cond.type().isUnknown()) {
     858                        if (!cond.type().isScalar() || !cond.type().isBoolean()) {
     859                            NON_BOOLEAN_CONDITIONAL_GUARD.invoke(this);
     860                        }
     861                        if (!cond.variability().fixedParameterOrLess()) {
     862                            NON_FIXED_CONDITIONAL_GUARD.invoke(this);
     863                        } else {
     864                            cond.markAsStructuralParameter(checkType);
     865                        }
     866                    }
    856867                }
    857868                if (!isDisabled() && hasInstModification()) {
Note: See TracChangeset for help on using the changeset viewer.