Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow partial calls in removed bindings (#7573)
- Move the check for partial function calls from the instantiation to the typing, to allow such calls in bindings of removed conditional components.
- Loading branch information
Showing
4 changed files
with
34 additions
and
7 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
19 changes: 19 additions & 0 deletions
19
testsuite/flattening/modelica/scodeinst/PartialFunction2.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,19 @@ | ||
// name: PartialFunction2 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
partial function f | ||
input Real x; | ||
output Real y; | ||
end f; | ||
|
||
class PartialFunction2 | ||
Real x = f(time) if false; | ||
end PartialFunction2; | ||
|
||
// Result: | ||
// class PartialFunction2 | ||
// end PartialFunction2; | ||
// endResult |