From 95993ea7a4949af99f8987912788dffe382ea957 Mon Sep 17 00:00:00 2001 From: "J. Gareth \"Curious Kit\" Moreton" Date: Tue, 6 May 2025 16:46:37 +0100 Subject: [PATCH] * Str returns a nicer error (and corrects the position) if a non-ordinal type is passed into it --- compiler/ninl.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/ninl.pas b/compiler/ninl.pas index 9d02716602..2ede21e594 100644 --- a/compiler/ninl.pas +++ b/compiler/ninl.pas @@ -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;