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#2315 - OpenModelica/OpenModelica-testsuite#897
- Loading branch information
1 parent
e564a04
commit 489a0c5
Showing
2 changed files
with
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// name: BindingArray7 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
operator record Complex | ||
replaceable Real re; | ||
replaceable Real im; | ||
end Complex; | ||
|
||
type Resistance = Real(final quantity = "Resistance"); | ||
|
||
operator record ComplexImpedance = Complex( | ||
redeclare Resistance re, | ||
redeclare Resistance im | ||
); | ||
|
||
model Impedance | ||
parameter ComplexImpedance Z; | ||
end Impedance; | ||
|
||
model BindingArray7 | ||
Impedance[3] i; | ||
end BindingArray7; | ||
|
||
// Result: | ||
// class BindingArray7 | ||
// parameter Real i[1].Z.re(quantity = "Resistance"); | ||
// parameter Real i[1].Z.im(quantity = "Resistance"); | ||
// parameter Real i[2].Z.re(quantity = "Resistance"); | ||
// parameter Real i[2].Z.im(quantity = "Resistance"); | ||
// parameter Real i[3].Z.re(quantity = "Resistance"); | ||
// parameter Real i[3].Z.im(quantity = "Resistance"); | ||
// end BindingArray7; | ||
// 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