mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 12:49:16 +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
|
||||
(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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user