diff --git a/.gitattributes b/.gitattributes index 9fc1db774c..ae3656329c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18346,6 +18346,7 @@ tests/webtbs/tw3721.pp svneol=native#text/plain tests/webtbs/tw37218.pp svneol=native#text/pascal tests/webtbs/tw37228.pp svneol=native#text/plain tests/webtbs/tw37254.pp svneol=native#text/pascal +tests/webtbs/tw37261.pp svneol=native#text/pascal tests/webtbs/tw37272a.pp svneol=native#text/pascal tests/webtbs/tw3742.pp svneol=native#text/plain tests/webtbs/tw3751.pp svneol=native#text/plain diff --git a/compiler/pgenutil.pas b/compiler/pgenutil.pas index 657918aea6..56567d6cff 100644 --- a/compiler/pgenutil.pas +++ b/compiler/pgenutil.pas @@ -1247,7 +1247,7 @@ uses end; procdef: begin - pdflags:=[pd_body,pd_implemen]; + pdflags:=[]; if genericdef.owner.symtabletype=objectsymtable then include(pdflags,pd_object) else if genericdef.owner.symtabletype=recordsymtable then @@ -1259,6 +1259,7 @@ uses handle_calling_convention(tprocdef(result),hcc_default_actions_intf) else handle_calling_convention(tprocdef(result),hcc_default_actions_impl); + pdflags:=pdflags+[pd_body,pd_implemen]; proc_add_definition(tprocdef(result)); { for partial specializations we implicitely declare the routine as having its implementation although we'll not specialize it in reality } diff --git a/tests/webtbs/tw37261.pp b/tests/webtbs/tw37261.pp new file mode 100644 index 0000000000..c32877566f --- /dev/null +++ b/tests/webtbs/tw37261.pp @@ -0,0 +1,21 @@ +program Project1; + +{$mode delphi} + +type + + { TClass } + + TClass = class + public + class function ToString(A: T; B: string): string; reintroduce; + end; + +{ TClass } + +class function TClass.ToString(A: T; B: string): string; +begin end; + +begin + TClass.ToString(1, ''); +end.