Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#2829 closed defect (fixed)

Using nonexisting positional function arguments gives bad error

Reported by: Per Östlund Owned by: Martin Sjölund
Priority: high Milestone: 1.9.4
Component: Frontend Version: trunk
Keywords: Cc:

Description

Instantiating the following model:

function f
  input Real x;
  output Real y := x;
end f;

model M
  Real x = f(z = 1.0);
end M;

gives an error message:

Error: Failed to elaborate expression: f(z = 1.0).

z obviously doesn't exist in f, but the compiler should give a better error message for this.

Change History (4)

comment:1 by Martin Sjölund, 10 years ago

Owner: changed from somebody to Martin Sjölund
Status: newassigned

comment:2 by Per Östlund, 10 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r22389 and r22391.

comment:3 by Dietmar Winkler, 9 years ago

Milestone: Futurepre1.9.4

It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.

comment:4 by Martin Sjölund, 7 years ago

Milestone: pre1.9.41.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.