소스 검색

Avoid invalid typecast to tabstractvarsym

Pierre Muller 3 년 전
부모
커밋
bb39ec1610
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      compiler/defcmp.pas

+ 2 - 1
compiler/defcmp.pas

@@ -2662,7 +2662,8 @@ implementation
                         - method variable
                         - function reference
                         - nested function }
-                    else if (captured.count=1) and (vo_is_self in tabstractvarsym(pcapturedsyminfo(captured[0])^.sym).varoptions) then
+                    else if (captured.count=1) and (tsym(pcapturedsyminfo(captured[0])^.sym).typ in [localvarsym,paravarsym]) and
+                         (vo_is_self in tabstractvarsym(pcapturedsyminfo(captured[0])^.sym).varoptions) then
                       begin
                         if po_methodpointer in def2.procoptions then
                           eq:=te_convert_l1