Преглед изворни кода

* GetCopyAndTypeCheck forces correct type
* propagate forinline flag through simplify

git-svn-id: trunk@45213 -

florian пре 5 година
родитељ
комит
43e6d84f33
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      compiler/nadd.pas

+ 2 - 1
compiler/nadd.pas

@@ -484,6 +484,7 @@ implementation
         begin
         begin
           result:=getcopy;
           result:=getcopy;
           result.resultdef:=nil;
           result.resultdef:=nil;
+          result:=ctypeconvnode.create_internal(result,resultdef);
           do_typecheckpass(result);
           do_typecheckpass(result);
         end;
         end;
 
 
@@ -783,7 +784,7 @@ implementation
                           { keep the order of val+const else pointer operations might cause an error }
                           { keep the order of val+const else pointer operations might cause an error }
                           hp:=taddnode(left).left;
                           hp:=taddnode(left).left;
                           taddnode(left).left:=right;
                           taddnode(left).left:=right;
-                          left:=left.simplify(false);
+                          left:=left.simplify(forinline);
                           right:=left;
                           right:=left;
                           left:=hp;
                           left:=hp;
                           result:=GetCopyAndTypeCheck;
                           result:=GetCopyAndTypeCheck;