Skip to content

Commit

Permalink
Remove wrong error for clocked continuous exps
Browse files Browse the repository at this point in the history
See: Modelica_Synchronous.Examples.
   Elementary.RealSignals.HoldWithDAeffects2
   Elementary.RealSignals.SampleWithADeffects
   SimpleControlledDrive.ClockedWith_AD_DA_Effects
   ...
  • Loading branch information
rfranke committed May 29, 2016
1 parent cde23af commit b526c9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 4 additions & 8 deletions Compiler/BackEnd/SynchronousFeatures.mo
Expand Up @@ -1082,14 +1082,10 @@ protected
algorithm
isContClockedPartition := arrayGet(inContPartitions, inPartitionIdx);
isContClockedPartition := match isContClockedPartition
case NONE() then SOME(inIsContClockedPartition);
case SOME(isContClockedPrevPartition)
guard(inIsContClockedPartition == isContClockedPrevPartition)
then isContClockedPartition;
else
equation
Error.addSourceMessage(Error.CLOCKED_DSICRETE_CONT_CONFLICT, {}, source);
then fail();
case NONE() then
SOME(inIsContClockedPartition);
case SOME(isContClockedPrevPartition) then
SOME(inIsContClockedPartition or isContClockedPrevPartition);
end match;
arrayUpdate(inContPartitions, inPartitionIdx, isContClockedPartition);
end setContClockedPartition;
Expand Down
2 changes: 0 additions & 2 deletions Compiler/Util/Error.mo
Expand Up @@ -827,8 +827,6 @@ public constant Message CLOCKED_WHEN_IN_WHEN_EQ = MESSAGE(566, TRANSLATION(), ER
Util.gettext("Clocked when equation inside the body of when equation."));
public constant Message CONT_CLOCKED_PARTITION_CONFLICT_EQ = MESSAGE(567, TRANSLATION(), ERROR(),
Util.gettext("Equation belongs to clocked and continuous partitions."));
public constant Message CLOCKED_DSICRETE_CONT_CONFLICT = MESSAGE(568, TRANSLATION(), ERROR(),
Util.gettext("Clocked equation contains discrete and continuous expression."));
public constant Message INVALID_CLOCK_EQUATION = MESSAGE(569, TRANSLATION(), ERROR(),
Util.gettext("Invalid form of clock equation"));
public constant Message SUBCLOCK_CONFLICT = MESSAGE(570, TRANSLATION(), ERROR(),
Expand Down

0 comments on commit b526c9b

Please sign in to comment.