Skip to content

Commit

Permalink
- Fix for bug #2356
Browse files Browse the repository at this point in the history
  make the error message a warning and proceed with flattening.
- add testsuite/flattening/modelica/others/ExternalObjectVariable.mo to test this.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17300 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Sep 18, 2013
1 parent 7de6b1c commit bec7e26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Static.mo
Expand Up @@ -9560,7 +9560,7 @@ algorithm
false = Types.isParameterOrConstant(const);
str = ExpressionDump.printExpStr(inExp);
Error.addSourceMessage(Error.EVAL_EXTERNAL_OBJECT_CONSTRUCTOR, {str}, info);
then fail();
then (inCache,inExp);
end matchcontinue;
end evalExternalObjectInput;

Expand Down
2 changes: 1 addition & 1 deletion Compiler/Util/Error.mo
Expand Up @@ -662,7 +662,7 @@ public constant Message RECURSION_DEPTH_WARNING = MESSAGE(532, TRANSLATION(), ER
Util.gettext("The maximum recursion depth was reached when evaluating expression %s in scope %s. Translation may still succeed but you are recommended to fix the problem."));
public constant Message RECURSION_DEPTH_DERIVED = MESSAGE(533, TRANSLATION(), ERROR(),
Util.gettext("The maximum recursion depth was reached when instantiating a derived class. Current class %s in scope %s."));
public constant Message EVAL_EXTERNAL_OBJECT_CONSTRUCTOR = MESSAGE(534, TRANSLATION(), ERROR(),
public constant Message EVAL_EXTERNAL_OBJECT_CONSTRUCTOR = MESSAGE(534, TRANSLATION(), WARNING(),
Util.gettext("OpenModelica requires that all external objects input arguments are possible to evaluate before initialization in order to avoid odd run-time failures, but %s is a variable."));
public constant Message CLASS_ANNOTATION_DOES_NOT_EXIST = MESSAGE(535, SCRIPTING(), ERROR(),
Util.gettext("Could not find class annotation %s in class %s."));
Expand Down

0 comments on commit bec7e26

Please sign in to comment.