Skip to content

Commit

Permalink
Allow to instantiate inherited classes
Browse files Browse the repository at this point in the history
  • Loading branch information
gossen committed Oct 18, 2015
1 parent 88d0d6f commit 3844b74
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Compiler/Script/CevalScriptBackend.mo
Expand Up @@ -2352,6 +2352,7 @@ algorithm
if Flags.isSet(Flags.GC_PROF) then
print(GC.profStatsStr(GC.getProfStats(), head="GC stats after front-end:") + "\n");
end if;

end runFrontEnd;

protected function runFrontEndLoadProgram
Expand All @@ -2375,7 +2376,7 @@ algorithm
Boolean b;
case (_, GlobalScript.SYMBOLTABLE(ast=p))
equation
_ = Interactive.getPathedClassInProgram(className, p);
_ = Interactive.getPathedClassInProgram(className, p, true);
then inSt;
case (_, GlobalScript.SYMBOLTABLE(p,fp,ic,iv,cf,lf))
equation
Expand Down Expand Up @@ -2420,7 +2421,7 @@ algorithm

System.realtimeTick(ClockIndexes.RT_CLOCK_FINST);
str = Absyn.pathString(className);
(absynClass as Absyn.CLASS(restriction = restriction)) = Interactive.getPathedClassInProgram(className, p);
(absynClass as Absyn.CLASS(restriction = restriction)) = Interactive.getPathedClassInProgram(className, p, true);
re = Absyn.restrString(restriction);
Error.assertionOrAddSourceMessage(relaxedFrontEnd or not (Absyn.isFunctionRestriction(restriction) or Absyn.isPackageRestriction(restriction)),
Error.INST_INVALID_RESTRICTION,{str,re},Absyn.dummyInfo);
Expand Down Expand Up @@ -2469,7 +2470,7 @@ algorithm
false = Flags.isSet(Flags.GRAPH_INST);
false = Flags.isSet(Flags.SCODE_INST);
str = Absyn.pathString(className);
(absynClass as Absyn.CLASS(restriction = restriction)) = Interactive.getPathedClassInProgram(className, p);
(absynClass as Absyn.CLASS(restriction = restriction)) = Interactive.getPathedClassInProgram(className, p, true);
re = Absyn.restrString(restriction);
Error.assertionOrAddSourceMessage(relaxedFrontEnd or not (Absyn.isFunctionRestriction(restriction) or Absyn.isPackageRestriction(restriction)),
Error.INST_INVALID_RESTRICTION,{str,re},Absyn.dummyInfo);
Expand Down

0 comments on commit 3844b74

Please sign in to comment.