Skip to content

Commit

Permalink
- Added test case for #3337.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost committed May 28, 2015
1 parent c57605b commit 9ae7723
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions flattening/modelica/modification/Makefile
Expand Up @@ -52,6 +52,7 @@ Overwriting1.mo \
Overwriting2.mo \
Shadow1.mo \
UsertypeModifications.mo \
UsertypeArrayMod.mo \
TestMissingModifiers.mos


Expand Down
38 changes: 38 additions & 0 deletions flattening/modelica/modification/UsertypeArrayMod.mo
@@ -0,0 +1,38 @@
// name: UsertypeArrayMod
// keywords: modification array type
// status: correct
//

model UsertypeArrayMod
type T = Real[3, 2](start = {{1, 2}, {3, 4}, {5, 6}});
T x[4, 1];
end UsertypeArrayMod;

// Result:
// class UsertypeArrayMod
// Real x[1,1,1,1](start = 1.0);
// Real x[1,1,1,2](start = 2.0);
// Real x[1,1,2,1](start = 3.0);
// Real x[1,1,2,2](start = 4.0);
// Real x[1,1,3,1](start = 5.0);
// Real x[1,1,3,2](start = 6.0);
// Real x[2,1,1,1](start = 1.0);
// Real x[2,1,1,2](start = 2.0);
// Real x[2,1,2,1](start = 3.0);
// Real x[2,1,2,2](start = 4.0);
// Real x[2,1,3,1](start = 5.0);
// Real x[2,1,3,2](start = 6.0);
// Real x[3,1,1,1](start = 1.0);
// Real x[3,1,1,2](start = 2.0);
// Real x[3,1,2,1](start = 3.0);
// Real x[3,1,2,2](start = 4.0);
// Real x[3,1,3,1](start = 5.0);
// Real x[3,1,3,2](start = 6.0);
// Real x[4,1,1,1](start = 1.0);
// Real x[4,1,1,2](start = 2.0);
// Real x[4,1,2,1](start = 3.0);
// Real x[4,1,2,2](start = 4.0);
// Real x[4,1,3,1](start = 5.0);
// Real x[4,1,3,2](start = 6.0);
// end UsertypeArrayMod;
// endResult

0 comments on commit 9ae7723

Please sign in to comment.