2
0
Эх сурвалжийг харах

* ensure that a nested function variable can not be assigned to a function reference

Sven/Sarah Barth 3 жил өмнө
parent
commit
3b7842c30e

+ 6 - 0
compiler/procdefutil.pas

@@ -895,6 +895,12 @@ implementation
                 internalerror(2022041804);
             end;
         end
+      else if (n.resultdef.typ=procvardef) and
+          (po_delphi_nested_cc in tprocvardef(n.resultdef).procoptions) then
+        begin
+          MessagePos(n.fileinfo,type_e_nested_procvar_to_funcref);
+          exit;
+        end
       else
         pinested:=nil;