Skip to content

Commit 4ddc693

Browse files
perostOpenModelica-Hudson
authored andcommitted
Update nfinst tests.
Belonging to [master]: - OpenModelica/OMCompiler#2073 - OpenModelica/OpenModelica-testsuite#803
1 parent cac9f2e commit 4ddc693

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// name: InnerOuterDuplicate1
2+
// keywords:
3+
// status: correct
4+
// cflags: -d=newInst
5+
//
6+
// Tests that having duplicate outer elements due to inheritance works
7+
// correctly.
8+
//
9+
10+
model A
11+
outer Real x;
12+
end A;
13+
14+
model B
15+
extends A;
16+
outer Real x;
17+
end B;
18+
19+
model InnerOuterDuplicate1
20+
inner Real x = 1.0;
21+
B b;
22+
end InnerOuterDuplicate1;
23+
24+
// Result:
25+
// class InnerOuterDuplicate1
26+
// Real x = 1.0;
27+
// end InnerOuterDuplicate1;
28+
// endResult

flattening/modelica/scodeinst/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ InnerOuter6.mo \
314314
InnerOuter7.mo \
315315
InnerOuter8.mo \
316316
InnerOuterClass1.mo \
317+
InnerOuterDuplicate1.mo \
317318
InnerOuterInvalidMod1.mo \
318319
InnerOuterInvalidMod2.mo \
319320
InnerOuterInvalidMod3.mo \

0 commit comments

Comments
 (0)