Skip to content

Commit

Permalink
more fixes for ticket:5565
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Jul 21, 2019
1 parent e80848f commit 03cf86a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
18 changes: 18 additions & 0 deletions OMCompiler/Compiler/Script/Interactive.mo
Expand Up @@ -9203,6 +9203,13 @@ public function getInheritedClasses
input Absyn.Path inPath;
output list<Absyn.Path> outPaths;
algorithm

try

if not Flags.isSet(Flags.NF_API_NOISE) then
ErrorExt.setCheckpoint("getInheritedClasses");
end if;

outPaths := matchcontinue inPath
local
Absyn.Path modelpath;
Expand Down Expand Up @@ -9236,6 +9243,17 @@ algorithm
paths;
else {};
end matchcontinue;

if not Flags.isSet(Flags.NF_API_NOISE) then
ErrorExt.rollBack("getInheritedClasses");
end if;

else
if not Flags.isSet(Flags.NF_API_NOISE) then
ErrorExt.rollBack("getInheritedClasses");
end if;
end try;

end getInheritedClasses;

protected function getInheritanceCount
Expand Down
12 changes: 12 additions & 0 deletions testsuite/openmodelica/interactive-API/Ticket5565.mos
Expand Up @@ -38,6 +38,10 @@ getComponentModifierValue(Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.
getComponentModifierValue(Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.EngineV6_analytic,cylinder6.crankAngleOffset); getErrorString();
getInheritedClasses(Modelica.Mechanics.MultiBody.Joints.Revolute); getErrorString();

getInheritedClasses(Modelica.Fluid.Machines.BaseClasses.PartialPump.Monitoring); getErrorString();
getInheritedClasses(Modelica.Fluid.Machines.BaseClasses.PartialPump.HeatTransfer); getErrorString();


// Result:
// true
// Evaluating: loadModel(Modelica)
Expand Down Expand Up @@ -160,4 +164,12 @@ getInheritedClasses(Modelica.Mechanics.MultiBody.Joints.Revolute); getErrorStrin
// {}
// Evaluating: getErrorString()
// ""
// Evaluating: getInheritedClasses(Modelica.Fluid.Machines.BaseClasses.PartialPump.Monitoring)
// {Modelica.Fluid.Machines.BaseClasses.PumpMonitoring.PumpMonitoringBase}
// Evaluating: getErrorString()
// ""
// Evaluating: getInheritedClasses(Modelica.Fluid.Machines.BaseClasses.PartialPump.HeatTransfer)
// {Modelica.Fluid.Vessels.BaseClasses.HeatTransfer.IdealHeatTransfer}
// Evaluating: getErrorString()
// ""
// endResult

0 comments on commit 03cf86a

Please sign in to comment.