Changeset 0c5b95d in OpenModelica for OMCompiler/Compiler/Util/Error.mo


Ignore:
Timestamp:
2020-06-24T14:54:39+02:00 (4 years ago)
Author:
perost <perost86@…>
Branches:
Added-citation-metadata, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
Children:
b82f7618, bd8a362
Parents:
d65e6e3f
git-author:
Per Östlund <perost86@…> (06/24/20 14:04:48)
git-committer:
perost <perost86@…> (06/24/20 14:54:39)
Message:

[NF] Enforce function purity rules better.

  • Give a warning if any pure function contains calls to impure functions, and mark such functions as impure themselves to make sure they're not constant evaluated.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/Util/Error.mo

    r59c0cf1 r0c5b95d  
    805805public constant ErrorTypes.Message INVALID_NUMBER_OF_DIMENSIONS_FOR_PROMOTE = ErrorTypes.MESSAGE(366, ErrorTypes.TRANSLATION(), ErrorTypes.ERROR(),
    806806  Gettext.gettext("The second argument ‘%s‘ of promote may not be smaller than the number of dimensions (%s) of the first argument."));
     807public constant ErrorTypes.Message PURE_FUNCTION_WITH_IMPURE_CALLS = ErrorTypes.MESSAGE(367, ErrorTypes.TRANSLATION(), ErrorTypes.WARNING(),
     808  Gettext.gettext("Pure function ‘%s‘ contains a call to impure function ‘%s‘."));
    807809
    808810public constant ErrorTypes.Message INITIALIZATION_NOT_FULLY_SPECIFIED = ErrorTypes.MESSAGE(496, ErrorTypes.TRANSLATION(), ErrorTypes.WARNING(),
Note: See TracChangeset for help on using the changeset viewer.