Ticket #51 (closed defect: fixed)

Opened 4 months ago

Last modified 5 weeks ago

Multiple inheritance and array types

Reported by: HansOlsson Owned by: HansOlsson
Priority: normal Milestone: ModelicaSpec3.1
Component: --Modelica Specification-- Version: 3.0
Severity: normal Keywords:
Cc: Hide ticket: no

Description (last modified by dietmarw) (diff)

From Stefan Vorkoetter:

Consider the following:

  model M
    // Declare a pair of simple classes.
    class T Real t; end T;
    class U Real u; end U;

    // Now create a pair of array types.
    type TVec2 = T[2];
    type UVec3 = U[3];

    // This new class extends both array types.
    class V
        extends TVec2;
        extends UVec3;
    end V;

    // What is the dimension of v?
    V v;
end M;

Attachments

Change History

Changed 4 months ago by HansOlsson

Comment from Hans:

Should probably prohibit mixing classes with array dimensions (and types) with any other contents - including other components, types or classes with array dimensions.

Changed 4 months ago by dietmarw

  • hide_ticket unset
  • description modified (diff)

Changed 5 weeks ago by dietmarw

  • owner changed from otter to HansOlsson
  • status changed from new to assigned

Decision from 57th Modelica Design Meeting:

Not allowed currently (but very hidden). Proposal is to make it visible and slightly extend and clarify.
Hans will include it in the 3.1 specification.

Changed 5 weeks ago by HansOlsson

  • status changed from assigned to closed
  • resolution set to fixed

Changed 5 weeks ago by HansOlsson

Correct in 3.1 draft.

Add/Change #51 (Multiple inheritance and array types)

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.