Skip to content

Commit

Permalink
Expected output (is a warning, not an error)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed Dec 5, 2016
1 parent e952f3d commit fc47cd5
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions flattening/modelica/equations/WhenNotInitial.mo
@@ -1,4 +1,4 @@
// status: incorrect
// status: correct

model WhenNotInitial
discrete Real r(start=0, fixed=true);
Expand All @@ -9,16 +9,13 @@ equation
end WhenNotInitial;

// Result:
// Error processing file: WhenNotInitial.mo
// class WhenNotInitial
// discrete Real r(start = 0.0, fixed = true);
// equation
// when not initial() then
// r = 1.0;
// end when;
// end WhenNotInitial;
// [flattening/modelica/equations/WhenNotInitial.mo:6:3-8:11:writable] Warning: The standard says that initial() may only be used as a when condition (when initial() or when {..., initial(), ...}), but got condition not initial().
// [flattening/modelica/equations/WhenNotInitial.mo:6:3-8:11:writable] Error: Failed to instantiate equation
// when not initial() then
// r = 1;
// end when;.
// Error: Error occurred while flattening model WhenNotInitial
//
// # Error encountered! Exiting...
// # Please check the error message and the flags.
//
// Execution failed!
// endResult

0 comments on commit fc47cd5

Please sign in to comment.