mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-03 20:58:33 +02:00
Fix for Mantis #24848.
ngenutil.pas, AddToStructsInit: * don't add class constructors/destructors to the init table if they belong to a generic type + test git-svn-id: trunk@25234 -
This commit is contained in:
parent
83e843fe2a
commit
ff3bb9322a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13474,6 +13474,7 @@ tests/webtbs/tw2473.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw2480.pp svneol=native#text/plain
|
tests/webtbs/tw2480.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2481.pp svneol=native#text/plain
|
tests/webtbs/tw2481.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2483.pp svneol=native#text/plain
|
tests/webtbs/tw2483.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw24848.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2492.pp svneol=native#text/plain
|
tests/webtbs/tw2492.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2494.pp svneol=native#text/plain
|
tests/webtbs/tw2494.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2503.pp svneol=native#text/plain
|
tests/webtbs/tw2503.pp svneol=native#text/plain
|
||||||
|
@ -545,6 +545,7 @@ implementation
|
|||||||
StructList: TFPList absolute arg;
|
StructList: TFPList absolute arg;
|
||||||
begin
|
begin
|
||||||
if (tdef(p).typ in [objectdef,recorddef]) and
|
if (tdef(p).typ in [objectdef,recorddef]) and
|
||||||
|
not (df_generic in tdef(p).defoptions) and
|
||||||
([oo_has_class_constructor,oo_has_class_destructor] * tabstractrecorddef(p).objectoptions <> []) then
|
([oo_has_class_constructor,oo_has_class_destructor] * tabstractrecorddef(p).objectoptions <> []) then
|
||||||
StructList.Add(p);
|
StructList.Add(p);
|
||||||
end;
|
end;
|
||||||
|
17
tests/webtbs/tw24848.pp
Normal file
17
tests/webtbs/tw24848.pp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ %NORUN }
|
||||||
|
|
||||||
|
program project18;
|
||||||
|
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
type
|
||||||
|
TFoo<T> = class
|
||||||
|
class constructor Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
class constructor TFoo<T>.Create;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end. // Error: Undefined symbol: P$PROJECT18$_$TFOO$1_$__$$_create
|
Loading…
Reference in New Issue
Block a user