瀏覽代碼

* the clause for converting the captured symbols of a nested function must not be entered by an anonymous function

Sven/Sarah Barth 3 年之前
父節點
當前提交
260368ea55
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      compiler/procdefutil.pas

+ 3 - 0
compiler/procdefutil.pas

@@ -1511,6 +1511,9 @@ implementation
           assigned(pd.capturedsyms) and
           (pd.capturedsyms.count>0) then
         begin
+          if pd.was_anonymous then
+            internalerror(2022081201);
+
           {$ifdef DEBUG_CAPTURER}writeln('Converting symbols of nested function ',pd.procsym.name);{$endif}
 
           { this is a nested function, so rework all symbols that are used from