瀏覽代碼

compiler: fix translate_disp_call for cases with method calling with no arguments

git-svn-id: trunk@14746 -
paul 16 年之前
父節點
當前提交
b16653e099
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      compiler/ncal.pas

+ 5 - 1
compiler/ncal.pas

@@ -327,9 +327,13 @@ implementation
         paramssize:=0;
         while assigned(para) do
           begin
-            inc(paracount);
             typecheckpass(para.left);
 
+            { if it is not a parameter then break the loop }
+            if para.left.nodetype=nothingn then
+              break;
+            inc(paracount);
+
             { insert some extra casts }
             if is_constintnode(para.left) and not(is_64bitint(para.left.resultdef)) then
               begin