Skip to content

Commit 74a7737

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Added prefixing test.
Belonging to [master]: - OpenModelica/OMCompiler#2456 - OpenModelica/OpenModelica-testsuite#958
1 parent abc79f2 commit 74a7737

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

flattening/modelica/scodeinst/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ OperatorOverloadError1.mo \
569569
PackageConstant1.mo \
570570
ParameterBug.mos \
571571
Prefix1.mo \
572+
Prefix2.mo \
572573
PropagateExtends.mo \
573574
RangeInvalidStep1.mo \
574575
RangeInvalidStep2.mo \
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// name: Prefix2
2+
// keywords:
3+
// status: correct
4+
// cflags: -d=newInst
5+
//
6+
7+
model A
8+
Real x;
9+
end A;
10+
11+
model B
12+
Real y;
13+
A a(x = y);
14+
end B;
15+
16+
model Prefix2
17+
B b[2];
18+
end Prefix2;
19+
20+
// Result:
21+
// class Prefix2
22+
// Real b[1].y;
23+
// Real b[1].a.x = b[1].y;
24+
// Real b[2].y;
25+
// Real b[2].a.x = b[2].y;
26+
// end Prefix2;
27+
// endResult

0 commit comments

Comments
 (0)