Opened 15 years ago

Last modified 14 years ago

#1131 closed defect (worksforme)

Syntax error reported for annotations in extends clauses. (from MathCore)

Reported by: brugard Owned by: brugard
Priority: critical Milestone:
Component: Version:
Keywords: Cc: brugard,

Description

The kernel are not able to parse Modelica files if an annotation appears in an extends clause. This is allowed according to the grammar and is used in the Modelica 3 standard library.

The annotation can be any annotation, but typically the annotation is an annotation describing the mapping between the coordinate systems of the base- and subclass.
Example:

model B
end B;
model A
  extends B annotation(IconMap(extent={{-100,-100}, {100,100}},primitivesVisible=false),DiagramMap(extent={{-50,-50}, {0,0}},primitivesVisible=true));
end A;

Change History (2)

comment:1 Changed 15 years ago by brugard

http://intranet/trac/mathmodelica/ticket/2516

The compiler now accepts the annotation, but discards it.
list(A) on the example above gives:

model A
  extends B;
end A;

comment:2 Changed 14 years ago by sjoelund.se

Works in trunk

Note: See TracTickets for help on using tickets.