Opened 14 years ago

Last modified 14 years ago

#1321 closed defect (fixed)

Misleading error messages

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

Description

{{{package P

constant Real x = {1,1::2};
function fn

input Integer i;
output Real r;

algorithm

r := i;

end fn;

end P;

class A
Real a = P.fn(1);
end A;}}}

That model generates (using +g=MetaModelica) the following error:
{{{[a.mo:12:1-12:17:writable] Error: No matching function found for P.fn in component <NO COMPONENT>
[a.mo:12:1-12:17:writable] Error: Class P.fn not found in scope A.}}}

The problem is that we need to write specific error messages for each possible error as the compiler is currently written. There also needs to be more general error messages so that we at least start looking in the right direction.
(The error here is that x cannot instantiate; it's being partially instantiated when opening the scope P - there is no problem with P.fn)

Change History (1)

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

This was fixed in the trunk with the addition of generic error messages for elabExp

Note: See TracTickets for help on using tickets.