Opened 20 months ago

Closed 20 months ago

Last modified 18 months 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:

Description

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)
   is
      use type Model.Visitors.Traverse_Control;

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

   begin
      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, 20 months 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, 18 months ago

Milestone: 0.8.018.0

Milestone renamed

Note: See TracTickets for help on using tickets.