Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NF] Compare names when type checking connections.
- Loading branch information
Showing
3 changed files
with
40 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
33 changes: 33 additions & 0 deletions
33
testsuite/flattening/modelica/scodeinst/ConnectInvalidType2.mo
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,33 @@ | ||
// name: ConnectInvalidType2 | ||
// keywords: | ||
// status: incorrect | ||
// cflags: -d=newInst | ||
// | ||
|
||
connector C1 | ||
Real e; | ||
flow Real f; | ||
end C1; | ||
|
||
connector C2 | ||
Real e2; | ||
flow Real f2; | ||
end C2; | ||
|
||
model ConnectInvalidType2 | ||
C1 c1; | ||
C2 c2; | ||
equation | ||
connect(c1, c2); | ||
end ConnectInvalidType2; | ||
|
||
// Result: | ||
// Error processing file: ConnectInvalidType2.mo | ||
// [flattening/modelica/scodeinst/ConnectInvalidType2.mo:21:3-21:18:writable] Error: The type of variables c1 and c2 | ||
// are inconsistent in connect equations. | ||
// | ||
// # 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