Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
297f7c6
commit 74ef35d
Showing
4 changed files
with
66 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
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,19 @@ | ||
// name: TupleInvalid1 | ||
// keywords: | ||
// status: incorrect | ||
// cflags: -d=newInst | ||
// | ||
|
||
model TupleInvalid1 | ||
Real x = (1, 2); | ||
end TupleInvalid1; | ||
|
||
// Result: | ||
// Error processing file: TupleInvalid1.mo | ||
// [flattening/modelica/scodeinst/TupleInvalid1.mo:8:3-8:18:writable] Error: Tuple expressions may only occur on the left side of an assignment or equation with a single function call on the right side. Got the following expression: (1, 2). | ||
// | ||
// # Error encountered! Exiting... | ||
// # Please check the error message and the flags. | ||
// | ||
// Execution failed! | ||
// 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// name: TupleInvalid2 | ||
// keywords: | ||
// status: incorrect | ||
// cflags: -d=newInst | ||
// | ||
|
||
model TupleInvalid2 | ||
Real x; | ||
Real y; | ||
equation | ||
(x, y) = (1, 2); | ||
end TupleInvalid2; | ||
|
||
// Result: | ||
// Error processing file: TupleInvalid2.mo | ||
// [flattening/modelica/scodeinst/TupleInvalid2.mo:11:3-11:18:writable] Error: Tuple expressions may only occur on the left side of an assignment or equation with a single function call on the right side. Got the following expression: (1, 2). | ||
// | ||
// # Error encountered! Exiting... | ||
// # Please check the error message and the flags. | ||
// | ||
// Execution failed! | ||
// 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// name: TupleInvalid3 | ||
// keywords: | ||
// status: incorrect | ||
// cflags: -d=newInst | ||
// | ||
|
||
model TupleInvalid3 | ||
Real x; | ||
Real y; | ||
equation | ||
(x, y) = {1, 2}; | ||
end TupleInvalid3; | ||
|
||
// Result: | ||
// Error processing file: TupleInvalid3.mo | ||
// [flattening/modelica/scodeinst/TupleInvalid3.mo:11:3-11:18:writable] Error: Type mismatch in equation (x, y) = {1, 2} of type (Real, Real) = Integer[2]. | ||
// | ||
// # Error encountered! Exiting... | ||
// # Please check the error message and the flags. | ||
// | ||
// Execution failed! | ||
// endResult |