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
Showing
9 changed files
with
156 additions
and
14 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
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,21 @@ | ||
// name: PartialLookup1 | ||
// keywords: lookup partial redeclare | ||
// status: correct | ||
// | ||
// Checks that it's not allowed to look up a name in a partial class. | ||
// | ||
|
||
model PartialLookup1 | ||
partial package P | ||
model A end A; | ||
end P; | ||
|
||
P.A a; | ||
end PartialLookup1; | ||
|
||
// Result: | ||
// class PartialLookup1 | ||
// end PartialLookup1; | ||
// [flattening/modelica/scoping/PartialLookup1.mo:13:3-13:8:writable] Error: P is partial, name lookup is not allowed in partial classes. | ||
// | ||
// 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,31 @@ | ||
// name: PartialLookup2 | ||
// keywords: lookup partial redeclare | ||
// status: incorrect | ||
// | ||
// Checks that it's not allowed to look up a name in a partial class. | ||
// | ||
|
||
model A | ||
partial package PP | ||
model B end B; | ||
end PP; | ||
|
||
PP.B b; | ||
end A; | ||
|
||
model PartialLookup2 | ||
A a; | ||
end PartialLookup2; | ||
|
||
// Result: | ||
// Error processing file: PartialLookup2.mo | ||
// [flattening/modelica/scoping/PartialLookup2.mo:9:3-11:9:writable] Notification: From here: | ||
// [flattening/modelica/scoping/PartialLookup2.mo:17:3-17:6:writable] Error: component a contains the definition of a partial class PP. | ||
// Please redeclare it to any package compatible with A.PP. | ||
// Error: Error occurred while flattening model PartialLookup2 | ||
// | ||
// # 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
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
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