Opened 6 years ago

Closed 6 years ago

#5125 closed defect (fixed)

Wrong instantiation of default function arguments

Reported by: Rüdiger Franke Owned by: Per Östlund
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

See the following example:

  function f
    input Real u1;
    input Real u2 = u1;
    output Real y;
  algorithm
    y := u1 + u2;
  end f;

  model m
    input Real a(start = 1);
    output Real b;
  equation
    b = f(a);
  end m;

The old frontend (omc) produces correctly:

class m
  input Real a(start = 1.0);
  output Real b;
equation
  b = f(a, a);
end m;

The new frontend (omc -d=newInst) produces wrongly:

class m
  input Real a(start = 1.0);
  output Real b;
equation
  b = f(a, u1);
end m;

Change History (2)

comment:1 by Francesco Casella, 6 years ago

Milestone: 1.13.02.0.0

comment:2 by Per Östlund, 6 years ago

Resolution: fixed
Status: newclosed

Fixed in 58e6759.

Note: See TracTickets for help on using tickets.