Skip to content

Commit 54840e0

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Handle comparison of empty expressions
1 parent 03dd6d2 commit 54840e0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Compiler/FrontEnd/Expression.mo

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12940,6 +12940,11 @@ algorithm
1294012940
DAE.SHARED_LITERAL(index = i) := inExp2;
1294112941
then Util.intCompare(inExp1.index, i);
1294212942

12943+
case DAE.EMPTY()
12944+
algorithm
12945+
DAE.EMPTY(name=cr) := inExp2;
12946+
then ComponentReference.crefCompareGeneric(inExp1.name, cr);
12947+
1294312948
else
1294412949
algorithm
1294512950
Error.addInternalError("Expression.compare failed: ctor:" + String(valueConstructor(inExp1)) + " " + printExpStr(inExp1) + " " + printExpStr(inExp2), sourceInfo());

Compiler/FrontEnd/InstSection.mo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3071,6 +3071,10 @@ algorithm
30713071
then
30723072
fail();
30733073

3074+
// Failed in graphics mode; just continue
3075+
case (cache,env,ih,sets,_,_,_,_,graph) guard Config.getGraphicsExpMode()
3076+
then (cache,env,ih,sets,DAE.emptyDae,graph);
3077+
30743078
case (_,_,_,_,_,c1,c2,_,_)
30753079
equation
30763080
true = Flags.isSet(Flags.FAILTRACE);

0 commit comments

Comments
 (0)