Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Belonging to [master]: - OpenModelica/OMCompiler#2711 - OpenModelica/OpenModelica-testsuite#1048
- Loading branch information
1 parent
1d6f8f5
commit b11ba59
Showing
2 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
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: RecordBinding3 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
record R | ||
Real x[:] = {1, 2, 3}; | ||
Real y[:]; | ||
Real z[size(y, 1)]; | ||
end R; | ||
|
||
model RecordBinding3 | ||
R r = R(ones(5), {1, 2}, {3, 4}); | ||
end RecordBinding3; | ||
|
||
// Result: | ||
// class RecordBinding3 | ||
// Real r.x[1]; | ||
// Real r.x[2]; | ||
// Real r.x[3]; | ||
// Real r.x[4]; | ||
// Real r.x[5]; | ||
// Real r.y[1]; | ||
// Real r.y[2]; | ||
// Real r.z[1]; | ||
// Real r.z[2]; | ||
// equation | ||
// r.x = {1.0, 1.0, 1.0, 1.0, 1.0}; | ||
// r.y = {1.0, 2.0}; | ||
// r.z = {3.0, 4.0}; | ||
// end RecordBinding3; | ||
// endResult |