Opened 6 years ago

Closed 6 years ago

#5027 closed defect (fixed)

The NF evaluates multiple subscripts wrong

Reported by: perost Owned by: perost
Priority: high Milestone: 2.0.0
Component: New Instantiation Version: v1.13.0-dev-nightly
Keywords: Cc:

Description

The NF evaluates expressions with multiple subscripts wrong, which affects e.g. Modelica.Media.Incompressible.Examples.Glycol47. Example model:

model M
  constant Real x[4,2] = [1, 2; 3, 4; 5, 6; 7, 8];
  constant Real y[4] = x[:, 1];
end M;

In this case the NF evaluates x[:, 1] as (x[:])[1], which is equivalent to x[1]. This causes it to fail without an error later since the binding of y will become {1, 2} instead of the expected {1, 3, 5, 7}.

Change History (1)

comment:1 Changed 6 years ago by perost

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.