Преглед на файлове

* first check for overloaded operator before doing inserting any
typeconvs

peter преди 24 години
родител
ревизия
002118ddf4
променени са 1 файла, в които са добавени 14 реда и са изтрити 10 реда
  1. 14 10
      compiler/nadd.pas

+ 14 - 10
compiler/nadd.pas

@@ -115,6 +115,15 @@ implementation
             resulttypepass(right);
             resulttypepass(right);
           end;
           end;
 
 
+         { allow operator overloading }
+         hp:=self;
+         if isbinaryoverloaded(hp) then
+           begin
+              resulttypepass(hp);
+              result:=hp;
+              exit;
+           end;
+
          { is one a real float, then both need to be floats, this
          { is one a real float, then both need to be floats, this
            need to be done before the constant folding so constant
            need to be done before the constant folding so constant
            operation on a float and int are also handled }
            operation on a float and int are also handled }
@@ -443,15 +452,6 @@ implementation
               exit;
               exit;
            end;
            end;
 
 
-         { allow operator overloading }
-         hp:=self;
-         if isbinaryoverloaded(hp) then
-           begin
-              resulttypepass(hp);
-              result:=hp;
-              exit;
-           end;
-
          { but an int/int gives real/real! }
          { but an int/int gives real/real! }
          if nodetype=slashn then
          if nodetype=slashn then
           begin
           begin
@@ -1217,7 +1217,11 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.26  2001-05-19 12:53:52  peter
+  Revision 1.27  2001-05-19 21:11:50  peter
+    * first check for overloaded operator before doing inserting any
+      typeconvs
+
+  Revision 1.26  2001/05/19 12:53:52  peter
     * check set types when doing constant set evaluation
     * check set types when doing constant set evaluation
 
 
   Revision 1.25  2001/04/13 01:22:08  peter
   Revision 1.25  2001/04/13 01:22:08  peter