Browse Source

* ifdef'd code that checked for failed inherited constructors

peter 22 years ago
parent
commit
fcea95f596
1 changed files with 9 additions and 3 deletions
  1. 9 3
      compiler/pexpr.pas

+ 9 - 3
compiler/pexpr.pas

@@ -958,8 +958,10 @@ implementation
          static_name : string;
          static_name : string;
          isclassref : boolean;
          isclassref : boolean;
          srsymtable : tsymtable;
          srsymtable : tsymtable;
+{$ifdef CHECKINHERITEDRESULT}
          newstatement : tstatementnode;
          newstatement : tstatementnode;
          newblock     : tblocknode;
          newblock     : tblocknode;
+{$endif CHECKINHERITEDRESULT}
       begin
       begin
          if sym=nil then
          if sym=nil then
            begin
            begin
@@ -1004,7 +1006,7 @@ implementation
                              not(po_classmethod in tcallnode(p1).procdefinition.procoptions) and
                              not(po_classmethod in tcallnode(p1).procdefinition.procoptions) and
                              not(tcallnode(p1).procdefinition.proctypeoption=potype_constructor) then
                              not(tcallnode(p1).procdefinition.proctypeoption=potype_constructor) then
                             Message(parser_e_only_class_methods_via_class_ref);
                             Message(parser_e_only_class_methods_via_class_ref);
-
+{$ifdef CHECKINHERITEDRESULT}
                            { when calling inherited constructor we need to check the return value }
                            { when calling inherited constructor we need to check the return value }
                            if (nf_inherited in callnflags) and
                            if (nf_inherited in callnflags) and
                               (tcallnode(p1).procdefinition.proctypeoption=potype_constructor) then
                               (tcallnode(p1).procdefinition.proctypeoption=potype_constructor) then
@@ -1056,8 +1058,9 @@ implementation
                                    end
                                    end
                                  else
                                  else
                                    internalerror(200305133);
                                    internalerror(200305133);
-                               do_resulttypepass(p1);
                              end;
                              end;
+{$endif CHECKINHERITEDRESULT}
+                           do_resulttypepass(p1);
                         end;
                         end;
                    end;
                    end;
                  varsym:
                  varsym:
@@ -2397,7 +2400,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.118  2003-05-13 19:14:41  peter
+  Revision 1.119  2003-05-13 20:54:39  peter
+    * ifdef'd code that checked for failed inherited constructors
+
+  Revision 1.118  2003/05/13 19:14:41  peter
     * failn removed
     * failn removed
     * inherited result code check moven to pexpr
     * inherited result code check moven to pexpr