Opened 7 years ago

Last modified 6 years ago

#4843 new defect

NF doesn't evaluate size expression of function input parameters

Reported by: Per Östlund Owned by: Per Östlund
Priority: normal Milestone: 2.1.0
Component: New Instantiation Version: v1.13.0-dev-nightly
Keywords: Cc:

Description

The new frontend only types function parameters when typing the function itself, without taking input arguments into account. When typing a function call it should reevaluate the types of the parameters based in the input arguments, so that it catches error like this (where the function should only take a square matrix):

function f
  input Real x[:, size(x, 1)];
end f;

model M
algorithm
  f({{1, 2, 3}, {3, 4, 5}});
end M;

Change History (1)

comment:1 by Francesco Casella, 6 years ago

Milestone: 2.0.02.1.0

Retargeting to 2.1.0, for 2.0.0 I would focus on getting to work stuff that doesn't

Note: See TracTickets for help on using tickets.