Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Belonging to [master]: - OpenModelica/OMCompiler#2638 - OpenModelica/OpenModelica-testsuite#1028
- Loading branch information
1 parent
ba6ffa5
commit 540aa9c
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// name: EnumEquation1 | ||
// keywords: equation, enumeration | ||
// status: correct | ||
// | ||
// Checks that equations involving enumeration work. | ||
// | ||
|
||
model EnumEquation1 | ||
type E = enumeration(a, b, c); | ||
E e1, e2; | ||
equation | ||
e1 = E.a; | ||
E.b = e2; | ||
E.a = E.a; | ||
end EnumEquation1; | ||
|
||
// Result: | ||
// class EnumEquation1 | ||
// enumeration(a, b, c) e1; | ||
// enumeration(a, b, c) e2; | ||
// equation | ||
// e1 = EnumEquation1.E.a; | ||
// e2 = EnumEquation1.E.b; | ||
// EnumEquation1.E.a = EnumEquation1.E.a; | ||
// end EnumEquation1; | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters