Opened 10 years ago

Closed 4 years ago

#3142 closed defect (fixed)

Better error message for missing function used as pointer

Reported by: Per Östlund Owned by: somebody
Priority: low Milestone: 1.16.0
Component: New Instantiation Version: trunk
Keywords: Cc:

Description

The following program:

partial function PF
end PF;

function f
  input PF pf;
end f;

function f2
algorithm
  _ := f(function invalidf(x = 2.0));
end f2;

gives the error message:

Error: Failed to elaborate expression: function invalidf(x = 2.0).

Saying that invalidf doesn't exist would be more helpful in this case.

Change History (1)

comment:1 by Per Östlund, 4 years ago

Component: FrontendNew Instantiation
Milestone: Future1.16.0
Resolution: fixed
Status: newclosed

The new frontend says Variable invalidf not found in scope f2, which I think is good enough.

Note: See TracTickets for help on using tickets.