瀏覽代碼

* don't store node trees for inline generic routines, as they contain
references to defs that are not stored in the ppu files (causing
errors) and are never used for inlining (only the specialisations
may be inlined) (fixes webtbs/tw27658.pp after r32031)

git-svn-id: trunk@32050 -

Jonas Maebe 10 年之前
父節點
當前提交
1e1e4b96e0
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      compiler/psub.pas

+ 5 - 0
compiler/psub.pas

@@ -145,6 +145,11 @@ implementation
         currpara : tparavarsym;
       begin
         result := false;
+        { this code will never be used (only specialisations can be inlined),
+          and moreover contains references to defs that are not stored in the
+          ppu file }
+        if df_generic in current_procinfo.procdef.defoptions then
+          exit;
         if pi_has_assembler_block in current_procinfo.flags then
           begin
             Message1(parser_h_not_supported_for_inline,'assembler');