Opened 13 years ago

Closed 3 years ago

Last modified 3 years ago

#1613 closed defect (fixed)

lookupVar does not return the correct direction of variables

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone: 1.19.0
Component: New Instantiation Version:
Keywords: Cc: Martin Sjölund

Description

I get the direction of i=Absyn.BIDIR() when I instantiate the following. That makes it quite hard to treat function input variables as parameters!

model M
  function f
    input Integer i;
    output Integer o[j];
  protected
    Integer j = i;
  algorithm
    o := fill(1,j);
  end f;
  Integer o[3] = f(3);
end M;

Change History (5)

comment:1 by Dietmar Winkler, 9 years ago

Cc: sjoelund.se, → sjoelund.se
Milestone: Future

comment:2 by Per Östlund, 3 years ago

Component: *unknown*
Resolution: fixed
Status: newclosed

With the new frontend the model is correctly flattened to:

model M
  function f
    input Integer i;
    output Integer o[j];
  protected
    Integer j = i;
  algorithm
    o := fill(1,j);
  end f;
  Integer o[3] = f(3);
end M;

The old frontend still can't handle this, but we don't care about that anymore.

comment:3 by Per Östlund, 3 years ago

Milestone: Future1.18.0

comment:4 by Francesco Casella, 3 years ago

Component: *unknown*New Instantiation

comment:5 by Francesco Casella, 3 years ago

Milestone: 1.18.01.19.0
Note: See TracTickets for help on using tickets.