Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 647ef10

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Fix Ceval error reporting.
- Give unbound constant errors for all targets except IGNORE_ERROR. Belonging to [master]: - #2551
1 parent 7d0153e commit 647ef10

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Compiler/NFFrontEnd/NFCeval.mo

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,6 +2528,8 @@ function printUnboundError
25282528
input Expression exp;
25292529
algorithm
25302530
() := match target
2531+
case EvalTarget.IGNORE_ERRORS() then ();
2532+
25312533
case EvalTarget.DIMENSION()
25322534
algorithm
25332535
Error.addSourceMessage(Error.STRUCTURAL_PARAMETER_OR_CONSTANT_WITH_NO_BINDING,
@@ -2542,15 +2544,14 @@ algorithm
25422544
then
25432545
fail();
25442546

2545-
case EvalTarget.GENERIC()
2547+
else
25462548
algorithm
25472549
Error.addMultiSourceMessage(Error.UNBOUND_CONSTANT,
25482550
{Expression.toString(exp)},
2549-
{InstNode.info(ComponentRef.node(Expression.toCref(exp))), target.info});
2551+
{InstNode.info(ComponentRef.node(Expression.toCref(exp))), EvalTarget.getInfo(target)});
25502552
then
25512553
fail();
25522554

2553-
else ();
25542555
end match;
25552556
end printUnboundError;
25562557

0 commit comments

Comments
 (0)