mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-07 05:50:41 +01:00
* better error messages for invalid floating point and classrefdef
typed constant expressions (only say that the problem is incompatible
types when the types actually are incompatible)
git-svn-id: trunk@12532 -
This commit is contained in:
parent
6916115086
commit
5c981f38ff
@ -288,8 +288,10 @@ implementation
|
||||
value:=trealconstnode(n).value_real
|
||||
else if is_constintnode(n) then
|
||||
value:=tordconstnode(n).value
|
||||
else if is_constnode(n) then
|
||||
IncompatibleTypes(n.resultdef, def)
|
||||
else
|
||||
IncompatibleTypes(n.resultdef, def);
|
||||
Message(parser_e_illegal_expression);
|
||||
|
||||
case def.floattype of
|
||||
s32real :
|
||||
@ -330,8 +332,10 @@ implementation
|
||||
end;
|
||||
niln:
|
||||
list.concat(Tai_const.Create_sym(nil));
|
||||
else if is_constnode(n) then
|
||||
IncompatibleTypes(n.resultdef, def)
|
||||
else
|
||||
IncompatibleTypes(n.resultdef, def);
|
||||
Message(parser_e_illegal_expression);
|
||||
end;
|
||||
n.free;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user