diff --git a/.gitattributes b/.gitattributes index 2de6c0760f..40b939d1a8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11334,6 +11334,7 @@ tests/webtbf/tw20907.pp svneol=native#text/plain tests/webtbf/tw20907a.pp svneol=native#text/plain tests/webtbf/tw21078.pp svneol=native#text/plain tests/webtbf/tw21087.pp svneol=native#text/plain +tests/webtbf/tw21238.pp svneol=native#text/pascal tests/webtbf/tw2128.pp svneol=native#text/plain tests/webtbf/tw2129.pp svneol=native#text/plain tests/webtbf/tw21466.pas svneol=native#text/pascal diff --git a/compiler/ptype.pas b/compiler/ptype.pas index 5df541e436..eb662085f4 100644 --- a/compiler/ptype.pas +++ b/compiler/ptype.pas @@ -922,7 +922,8 @@ implementation begin generate_specialization(def,false,name,nil,''); { handle nested types } - post_comp_expr_gendef(def); + if assigned(def) then + post_comp_expr_gendef(def); end else begin diff --git a/tests/webtbf/tw21238.pp b/tests/webtbf/tw21238.pp new file mode 100644 index 0000000000..176035655d --- /dev/null +++ b/tests/webtbf/tw21238.pp @@ -0,0 +1,12 @@ +{ %fail } +{$mode delphi} +uses + classes; +procedure FormShow(Sender: TObject); +var + List: TList; +begin +end; + +begin +end.