Skip to content

Commit

Permalink
Use language=grammar for modifiers in redeclaration and improve language
Browse files Browse the repository at this point in the history
Addressing comment by Hans:
- modelica#2916 (comment)
  • Loading branch information
henrikt-ma committed Apr 12, 2021
1 parent 6ff2a37 commit 7c1dd27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chapters/inheritance.tex
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ \section{Redeclaration}\label{redeclaration}
A \lstinline!redeclare! construct as an element replaces the declaration of a local class or component with another declaration.
Both \lstinline!redeclare! constructs work in the same way.
The \lstinline!redeclare! construct as an element requires that the element is inherited, and cannot be combined with a modifier of the same element in the extends-clause.
For modifiers the redeclare of classes uses a special short class definition construct; that is a subset of normal class definitions and semantically behave as the corresponding class-definition.
For modifiers, the redeclare of classes uses a special \lstinline[language=grammar]!short-class-definition! construct, which is a subset of normal class definitions and semantically behaves as the corresponding \lstinline[language=grammar]!class-definition!.

A modifier with the keyword \lstinline!replaceable!\indexinline{replaceable} is automatically seen as being a \lstinline!redeclare!.

Expand Down

0 comments on commit 7c1dd27

Please sign in to comment.