Browse Source

* using inherited; without a parent having the same function
will do nothing like delphi

peter 23 years ago
parent
commit
8af460ac31
2 changed files with 14 additions and 5 deletions
  1. 8 3
      compiler/pexpr.pas
  2. 6 2
      compiler/pstatmnt.pas

+ 8 - 3
compiler/pexpr.pas

@@ -1961,9 +1961,10 @@ implementation
                    end
                   else
                    begin
-                     Message1(sym_e_id_no_member,hs);
+                     { we didn't find a member in the parents so
+                       we do nothing. This is compatible with delphi (PFV) }
                      again:=false;
-                     p1:=cerrornode.create;
+                     p1:=cnothingnode.create;
                    end;
                   { turn auto inheriting off }
                   auto_inherited:=false;
@@ -2457,7 +2458,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.61  2002-04-07 13:31:36  carl
+  Revision 1.62  2002-04-16 16:11:17  peter
+    * using inherited; without a parent having the same function
+      will do nothing like delphi
+
+  Revision 1.61  2002/04/07 13:31:36  carl
   + change unit use
 
   Revision 1.60  2002/04/01 20:57:13  jonas

+ 6 - 2
compiler/pstatmnt.pas

@@ -991,7 +991,7 @@ implementation
              { blockn support because a read/write is changed into a blocknode }
              { with a separate statement for each read/write operation (JM)    }
              { the same is true for val() if the third parameter is not 32 bit }
-             if not(p.nodetype in [calln,assignn,breakn,inlinen,continuen,labeln,blockn,
+             if not(p.nodetype in [nothingn,calln,assignn,breakn,inlinen,continuen,labeln,blockn,
                                    simplenewn,simpledisposen]) then
                Message(cg_e_illegal_expression);
 
@@ -1202,7 +1202,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.51  2002-04-15 19:01:28  carl
+  Revision 1.52  2002-04-16 16:11:17  peter
+    * using inherited; without a parent having the same function
+      will do nothing like delphi
+
+  Revision 1.51  2002/04/15 19:01:28  carl
   + target_info.size_of_pointer -> pointer_Size
 
   Revision 1.50  2002/04/14 16:53:54  carl