2016-11-07 14:15 GMT-02:00 Sven Barth <[email protected]>:
> Am 07.11.2016 15:58 schrieb "African Wild Dog" <[email protected]>:
> > It is intended to change such compiler behavior in the future? It is
> incompatible with Delphi and moreover it force us to break the
> encapsulation of the Generic types.
>
> I can't answer this without you providing an example that fails.
>
Sorry for the noise. Some of my classes were bad designed. They look like
this sample (Delphi XE 6 compiles):
==== CODE BEGIN ====
unit sample;
{$MODE delphi}
interface
type
TGenericRecord<T> = record
strict private
Interf: IInterface;
type
TMockIntfObject<T> = record // Nested generic declaration
end;
public
FValue: T;
procedure SetValue(Value: T);
end;
implementation
{ TGenericRecord<T> }
procedure TGenericRecord<T>.SetValue(Value: T);
begin
Interf := TMockIntfObject.Create;
end;
end.
==== END ====
With fpc i got the error "Fatal: Declation of generic class inside another
generic class is not allowed".
Best regards
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal