소스 검색

* fix the internal error of #40639; however as the test code in question will only compile correctly with the next commit no test is added yet

Sven/Sarah Barth 1 년 전
부모
커밋
5e05630713
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      compiler/pdecobj.pas

+ 4 - 3
compiler/pdecobj.pas

@@ -774,6 +774,9 @@ implementation
           Internalerror(2011021103);
 
         consume(_FOR);
+        { set extendeddef to non-Nil so that potential checks for it won't trigger
+          access violations }
+        current_objectdef.extendeddef:=generrordef;
         single_type(hdef,[stoParseClassParent]);
         if not assigned(hdef) or (hdef.typ=errordef) then
           begin
@@ -837,9 +840,7 @@ implementation
           end;
 
         if assigned(hdef) then
-          current_objectdef.extendeddef:=hdef
-        else
-          current_objectdef.extendeddef:=generrordef;
+          current_objectdef.extendeddef:=hdef;
       end;
 
     procedure parse_guid;