Bläddra i källkod

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

Sven/Sarah Barth 3 år sedan
förälder
incheckning
260368ea55
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3 0
      compiler/procdefutil.pas

+ 3 - 0
compiler/procdefutil.pas

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