fpc/tests/test/tgeneric112.pp
Frederic Kehrein 05b73f1523 Postponing building of VMT until inheritance chain is specialized
This commit does 3 changes:
1. Introduce new option `oo_inherits_not_specialized` indicating if
   somewhere in the inheritance chain of an object there is a non
   specialized generic parameter
2. Avoid building the VMT for an object which has a generic parameter in
   the inheritance chain (fixes #40983)
3. When no vmt is build `insert_struct_hidden_paras` usually called as
   part of `build_vmt` will be called seperately to add missing
   parameters
2024-12-08 17:54:50 +00:00

16 lines
179 B
ObjectPascal

{$Mode ObjFPC}{$H+}
type
generic TTest<T:class> = class(T)
public
function Foo:Integer;override;
end;
function TTest.Foo:Integer;
begin
Result:=42;
end;
begin
end.