* 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:
Jonas Maebe 2009-01-09 18:46:10 +00:00
parent 6916115086
commit 5c981f38ff

View File

@ -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;