You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by jmattsson on 20 May 2014 14:50 UTC
The table in section 4.6 of the spec contains:
You are allowed to extend from an operator record as a short class definition (with certain restrictions).
You are not allowed to extend from any enclosing scope of an operator or operator function.
operator and operator function are only allowed inside operator record.
Together this gives that you are only allowed to extend from an operator record (as per the first point) if it doesn't contain any operator and operator function. The rule about enclosing scopes needs to be amended.
(Also, the item in the table for operator refers to "Section Chapter 14".)
Comment by hansolsson on 17 Jun 2014 09:23 UTC
Ok, as I see the "operator" and "operator function" the rule about no extend should exclude the special case for "operator record".
Comment by hansolsson on 17 Jun 2014 09:34 UTC
Due to #1459 the new text would be:
operator:
Similar to package; but may only contain declarations of functions. May only be placed in an operator record.
operator function:
Shorthand for an operator with exactly one function; same restriction as function class and in addition may only be placed in an operator record.
(Since "operator" is placed in "operator record" the enclosing scope is the operator record, so no need to add any additional restriction for extends.)
Reported by jmattsson on 20 May 2014 14:50 UTC
The table in section 4.6 of the spec contains:
operator record
as a short class definition (with certain restrictions).operator
oroperator function
.operator
andoperator function
are only allowed insideoperator record
.Together this gives that you are only allowed to extend from an
operator record
(as per the first point) if it doesn't contain anyoperator
andoperator function
. The rule about enclosing scopes needs to be amended.(Also, the item in the table for
operator
refers to "Section Chapter 14".)Migrated-From: https://trac.modelica.org/Modelica/ticket/1497
The text was updated successfully, but these errors were encountered: