mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 20:11:19 +02:00
* Str returns a nicer error (and corrects the position) if a non-ordinal type is passed into it
This commit is contained in:
parent
1a1ca72067
commit
95993ea7a4
@ -328,7 +328,8 @@ implementation
|
|||||||
not(is_real or is_enum or
|
not(is_real or is_enum or
|
||||||
(source.left.resultdef.typ=orddef)) then
|
(source.left.resultdef.typ=orddef)) then
|
||||||
begin
|
begin
|
||||||
CGMessagePos(fileinfo,parser_e_illegal_expression);
|
CGMessagePos1(source.fileinfo,
|
||||||
|
type_e_integer_expr_expected,source.resultdef.typename);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user