Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unassigned variable in NFCall (#7313)
- Fixes #6431.
- Loading branch information
Showing
3 changed files
with
34 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
31 changes: 31 additions & 0 deletions
31
testsuite/flattening/modelica/scodeinst/FuncUnknownDim3.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,31 @@ | ||
// name: FuncUnknownDim3 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
function f | ||
input Real[n] v; | ||
output Real[n] result = fill(1.0, n); | ||
protected | ||
parameter Integer n = size(v, 1); | ||
end f; | ||
|
||
model FuncUnknownDim3 | ||
Real x[2] = f({time, 1}); | ||
end FuncUnknownDim3; | ||
|
||
// Result: | ||
// function f | ||
// input Real[n] v; | ||
// output Real[n] result = fill(1.0, n); | ||
// protected parameter Integer n = n; | ||
// end f; | ||
// | ||
// class FuncUnknownDim3 | ||
// Real x[1]; | ||
// Real x[2]; | ||
// equation | ||
// x = f({time, 1.0}); | ||
// end FuncUnknownDim3; | ||
// 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