Skip to content

Commit

Permalink
add test for unqualified imports
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo authored and OpenModelica-Hudson committed Mar 8, 2017
1 parent 9bca227 commit 6d6eda6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -95,6 +95,7 @@ redeclare2.mo \
redeclare6.mo \
redeclare9.mo \
type2.mo \
UImport.mo \
usertype1.mo \
usertype2.mo \
usertype3.mo \
Expand Down
34 changes: 34 additions & 0 deletions flattening/modelica/scodeinst/UImport.mo
@@ -0,0 +1,34 @@
// name: Uimport.mo
// status: correct
// cflags: -d=newInst

package A
package B
function f
input Real x;
output Real y;
algorithm
y := x;
end f;
end B;

end A;

model M
import A.B.*;
parameter Real x = f(100);
end M;

// Result:
// function f
// input Real x;
// output Real y;
// algorithm
// y := x;
// end f;
//
// class M
// parameter Real x = f(100.0);
// end M;
// endResult

0 comments on commit 6d6eda6

Please sign in to comment.