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 per.ostlund on 8 Apr 2013 13:47 UTC
Section 4.6 says "It is not legal to extend from any of its enclosing scopes" regarding operator, operator function and operator record. This sentence is ambigouous though, since it could either mean that another class is not allowed to extend from any of the operator type's enclosing scopes, or that none of the enclosing scopes are allowed to extend. I do now see how the operator example in 4.6 supports either interpretation though, so the actual meaning might be something else.
Also, the table in section 7.1.3 is missing operator record, but perhaps that's because it's not legal to extend from an operator record. It might be good to add it for consistency though.
Comment by hansolsson on 4 Jun 2013 11:50 UTC
Consider:
package A
extends Icon; //Ok.
operator record B end B;
end A;
package A2
extends A; // Not legal
end A2;
package A3=A; // Not legal
Is it unclear that "from" means "extends A" and not "extends" in A?
The reason for the rule is that we want lexical names and do not want A2.B and A.B to sort of be equivalent (with all complications for rules about overloading).
Reported by per.ostlund on 8 Apr 2013 13:47 UTC
Section 4.6 says "It is not legal to extend from any of its enclosing scopes" regarding operator, operator function and operator record. This sentence is ambigouous though, since it could either mean that another class is not allowed to extend from any of the operator type's enclosing scopes, or that none of the enclosing scopes are allowed to extend. I do now see how the operator example in 4.6 supports either interpretation though, so the actual meaning might be something else.
Also, the table in section 7.1.3 is missing operator record, but perhaps that's because it's not legal to extend from an operator record. It might be good to add it for consistency though.
Migrated-From: https://trac.modelica.org/Modelica/ticket/1065
The text was updated successfully, but these errors were encountered: