Opened 10 years ago

Closed 10 years ago

#2832 closed defect (fixed)

Annotation in external objects is lost when instantiating

Reported by: carlj@… Owned by: Martin Sjölund
Priority: high Milestone: 1.9.1
Component: Frontend Version: trunk
Keywords: Cc:

Description (last modified by Martin Sjölund)

When instantiating an external object, the annotation in the class is lost. It seems to me like it would be present in the DAE.ElementSource in the DAE.EXTOBJECTCLASS, but InstFunction.instantiateExternalObject fills in very little information in the source for a DAE.EXTOBJECTCLASS.

To be clear, it is the annotation commented as X below that is missing.

    class Model
      extends ExternalObject;

      function constructor
       ....
      end constructor;

      function destructor
       ...
      end destructor;
     
      annotation(...); // X
    end Model;

Change History (4)

comment:1 by Martin Sjölund, 10 years ago

Which annotations that affect code generation do you believe the compiler should be able to access for external objects (and do not belong in the constructor/destructor)?

comment:2 by carlj@…, 10 years ago

At least all vendor annotations.

comment:3 by Martin Sjölund, 10 years ago

Description: modified (diff)
Milestone: 1.9.1
Owner: changed from somebody to Martin Sjölund
Status: newaccepted

comment:4 by Martin Sjölund, 10 years ago

Resolution: fixed
Status: acceptedclosed

This should work in r22454, but OpenModelica does not use the annotations on the class so I cannot test it.

Note: See TracTickets for help on using tickets.