Generic constraint "constructor" cannot be used with a type constraint.
Original Reporter info from Mantis: wlandgraf
-
Reporter name: Wagner Landgraf
Original Reporter info from Mantis: wlandgraf
- Reporter name: Wagner Landgraf
Description:
The following project doesn't compile, generating the compiler error:
[Error] Project5.dpr(9): "TFoo" constraint and "constructor" constraint cannot be specified together
It should be possible to specify both constraints in a generic type.
program Project5;
{$APPTYPE CONSOLE}
type
TFoo = class
end;
TStaticFactory<T: TFoo, constructor> = class
end;
begin
end.
Mantis conversion info:
- Mantis ID: 38855