* Str returns a nicer error (and corrects the position) if a non-ordinal type is passed into it

This commit is contained in:
J. Gareth "Curious Kit" Moreton 2025-05-06 16:46:37 +01:00 committed by FPK
parent 1a1ca72067
commit 95993ea7a4

View File

@ -328,7 +328,8 @@ implementation
not(is_real or is_enum or
(source.left.resultdef.typ=orddef)) then
begin
CGMessagePos(fileinfo,parser_e_illegal_expression);
CGMessagePos1(source.fileinfo,
type_e_integer_expr_expected,source.resultdef.typename);
exit;
end;