Skip to content

Commit

Permalink
- print types if components are not there in Types.printConnectorType
Browse files Browse the repository at this point in the history
- InstSection.validConnector now allows expandable connector components even if they are not connectors
- print the type of the outer of a missing inner component (a couple of tests will fail, I'll fix them in my next commit)



git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13838 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 8, 2012
1 parent 2529bf6 commit 194d685
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/ConnectUtil.mo
Expand Up @@ -351,7 +351,7 @@ algorithm
DAE.emptyElementSource, inConnectionSet);
end addFlowVariableFromDAE;

protected function isExpandable
public function isExpandable
input DAE.ComponentRef inName;
output Boolean isExpandableConnector;
algorithm
Expand Down
6 changes: 6 additions & 0 deletions Compiler/FrontEnd/Inst.mo
Expand Up @@ -7908,6 +7908,9 @@ algorithm
s1 = ComponentReference.printComponentRefStr(crefOuter);
s2 = Dump.unparseInnerouterStr(io);
s3 = InnerOuter.getExistingInnerDeclarations(ih, componentDefinitionParentEnv);
typeName = SCode.className(cl);
(cache, typePath) = makeFullyQualified(cache, env, Absyn.IDENT(typeName));
s1 = Absyn.pathString(typePath) +& " " +& s1;
// adrpo: do NOT! display an error message if impl = true and prefix is Prefix.NOPRE()
// print(Util.if_(impl, "impl crap\n", "no impl\n"));
Debug.bcall(impl and listMember(pre, {Prefix.NOPRE()}), ErrorExt.setCheckpoint, "innerouter-instVar-implicit");
Expand Down Expand Up @@ -7940,6 +7943,9 @@ algorithm
s1 = ComponentReference.printComponentRefStr(crefOuter);
s2 = Dump.unparseInnerouterStr(io);
s3 = InnerOuter.getExistingInnerDeclarations(ih,componentDefinitionParentEnv);
typeName = SCode.className(cl);
(cache, typePath) = makeFullyQualified(cache, env, Absyn.IDENT(typeName));
s1 = Absyn.pathString(typePath) +& " " +& s1;
// print(Util.if_(impl, "impl crap\n", "no impl\n"));
// adrpo: do NOT! display an error message if impl = true and prefix is Prefix.NOPRE()
Debug.bcall(impl and listMember(pre, {Prefix.NOPRE()}), ErrorExt.setCheckpoint, "innerouter-instVar-implicit");
Expand Down
7 changes: 7 additions & 0 deletions Compiler/FrontEnd/InstSection.mo
Expand Up @@ -3795,6 +3795,13 @@ algorithm
then
();

// everything in expandable is a connector!
case (_, _, _)
equation
true = ConnectUtil.isExpandable(inCref);
then
();

else
equation
str = ComponentReference.printComponentRefStr(inCref);
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Types.mo
Expand Up @@ -2428,7 +2428,7 @@ algorithm
then
(s,s2);

case(_) then ("","");
case (it) then ("",printTypeStr(it));
end matchcontinue;
end printConnectorTypeStr;

Expand Down

0 comments on commit 194d685

Please sign in to comment.