Browse Source

* improved error reporting by printing the type being found in with expressions

git-svn-id: trunk@23019 -
florian 12 years ago
parent
commit
f6109d7c65
4 changed files with 232 additions and 232 deletions
  1. 1 1
      compiler/msg/errore.msg
  2. 1 1
      compiler/msgidx.inc
  3. 229 229
      compiler/msgtxt.inc
  4. 1 1
      compiler/pstatmnt.pas

+ 1 - 1
compiler/msg/errore.msg

@@ -640,7 +640,7 @@ parser_e_expr_have_to_be_destructor_call=03077_E_Expression must be destructor c
 parser_e_invalid_record_const=03078_E_Illegal order of record elements
 parser_e_invalid_record_const=03078_E_Illegal order of record elements
 % When declaring a constant record, you specified the fields in the wrong
 % When declaring a constant record, you specified the fields in the wrong
 % order.
 % order.
-parser_e_false_with_expr=03079_E_Expression type must be class or record type
+parser_e_false_with_expr=03079_E_Expression type must be class or record type, got $1
 % A \var{with} statement needs an argument that is of the type \var{record}
 % A \var{with} statement needs an argument that is of the type \var{record}
 % or \var{class}. You are using \var{with} on an expression that is not of
 % or \var{class}. You are using \var{with} on an expression that is not of
 % this type.
 % this type.

+ 1 - 1
compiler/msgidx.inc

@@ -960,7 +960,7 @@ const
   option_info=11024;
   option_info=11024;
   option_help_pages=11025;
   option_help_pages=11025;
 
 
-  MsgTxtSize = 67825;
+  MsgTxtSize = 67833;
 
 
   MsgIdxMax : array[1..20] of longint=(
   MsgIdxMax : array[1..20] of longint=(
     26,92,328,120,87,56,125,26,202,63,
     26,92,328,120,87,56,125,26,202,63,

File diff suppressed because it is too large
+ 229 - 229
compiler/msgtxt.inc


+ 1 - 1
compiler/pstatmnt.pas

@@ -752,7 +752,7 @@ implementation
          else
          else
           begin
           begin
             p.free;
             p.free;
-            Message(parser_e_false_with_expr);
+            Message1(parser_e_false_with_expr,p.resultdef.GetTypeName);
             { try to recover from error }
             { try to recover from error }
             if try_to_consume(_COMMA) then
             if try_to_consume(_COMMA) then
              begin
              begin

Some files were not shown because too many files changed in this diff