Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#501 closed defect (fixed)

value of "in out" parameters is not updated

Reported by: vadim.godunko Owned by: Maxim Reznik
Priority: major Milestone: 18.0
Component: Matreshka - a2js Version:
Keywords: Cc:


Generated code doesn't contains update of value of "in out" parameters of simple types, for example

   procedure Visit
    (Self    : in out Abstract_Iterator'Class;
     Visitor : in out Model.Visitors.Abstract_Visitor'Class;
     Element : not null Model.Element_Access;
     Control : in out Model.Visitors.Traverse_Control)
      use type Model.Visitors.Traverse_Control;

      Element_Instance : Model.Internals.Elements.Element'Class
        renames Model.Internals.Elements.Element'Class (Element.all);

      Element_Instance.Enter_Element (Visitor, Control);

      if Control = Model.Visitors.Continue then
         Element_Instance.Visit_Element (Self, Visitor, Control);
      end if;

      if Control /= Model.Visitors.Terminate_Immidiately then
         Element_Instance.Leave_Element (Visitor, Control);
      end if;
   end Visit;

it generates

        _ec.visit = function visit(self$, visitor, element, control) {
            function _return() {
                return {
                    control: control
            (element).enter_element(visitor, control);
            if (control === _ec.model.visitors.traverse_control.continue) {
                (element).visit_element(self$, visitor, control);
            if (control !== _ec.model.visitors.traverse_control.terminate_immidiately) {
                (element).leave_element(visitor, control);
            return _return();

Change History (2)

comment:1 by Maxim Reznik, 3 years ago

Owner: set to Maxim Reznik
Resolution: fixed
Status: newclosed

In 5866:

a2js: Allow simple output parameters in dispatching call

Fix #501

comment:2 by vadim.godunko, 3 years ago


Milestone renamed

Note: See TracTickets for help on using tickets.