Skip to content

Commit

Permalink
Merge pull request modelica#2409 from HansOlsson/ConvertModifiersPrec…
Browse files Browse the repository at this point in the history
…edence

Give precendence for convertModifiers.
  • Loading branch information
HansOlsson committed Sep 2, 2019
2 parents c6439d5 + e8e8312 commit d8f16eb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1565,15 +1565,21 @@ \subsubsection{Conversion rules}\doublelabel{conversion-rules}
If OldModifer list is empty it is added for all uses of the class
\item
If OldModifier\_i is cardinality(a)=0 the conversion will only be
applied for a component comp if there is no inside connection to
applied for a component comp if there are no inside connections to
comp.a. This can be combined with other modifiers that are handled in
the usual way.
\item
If OldModifier\_i is cardinality(a)=1 the conversion will only be
applied for a component comp if there is are any inside connections to
comp.a
applied for a component comp if there are any inside connections to
comp.a.
\end{itemize}

The converted modifiers and existing modifiers are merged such that the existing modifiers take precedence over the result of convertModifiers.
A diagnostics is recommended if this merging removes some modifiers unless those modifiers are identical or it is the special case of an empty OldModifier list.
\begin{nonnormative}
This can be used to handle the case where the default value was changed.
\end{nonnormative}

Converting modifiers with cardinality is used to remove the deprecated
operator cardinality from model libraries, and replace tests on
cardinality in models by parameters explicitly enabling the different
Expand Down

0 comments on commit d8f16eb

Please sign in to comment.