<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-11-10 1:30 GMT-02:00 African Wild Dog <span dir="ltr"><<a href="mailto:paintedlycaon@gmail.com" target="_blank">paintedlycaon@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-">2016-11-07 14:15 GMT-02:00 Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span>:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_-107711454682553296gmail-"><p>Am 07.11.2016 15:58 schrieb "African Wild Dog" <<a href="mailto:paintedlycaon@gmail.com" target="_blank">paintedlycaon@gmail.com</a>>:<br>
> 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.</p>
</span><p>I can't answer this without you providing an example that fails.</p></blockquote></span><div><br>Sorry for the noise. Some of my classes were bad designed. They look like this sample (Delphi XE 6 compiles):<br><br></div><div>==== CODE BEGIN ====<br><span style="font-family:monospace,monospace"><br>unit sample;<br><br>{$MODE delphi}<br><br>interface<br><br>type<br>  TGenericRecord<T> = record<br>  strict private<br>    Interf: IInterface;<br>    type<br>      TMockIntfObject<T> = record // Nested generic declaration<br>      end;<br><br>  public<br>    FValue: T;<br>    procedure SetValue(Value: T);<br>  end;<br><br>implementation<br><br>{ TGenericRecord<T> }<br><br>procedure TGenericRecord<T>.SetValue(<wbr>Value: T);<br>begin<br>  Interf := TMockIntfObject.Create;<br>end;<br><br>end. </span><br></div></div><br><br></div><div class="gmail_extra">==== END ====<br><br><br></div><div class="gmail_extra"> With fpc i got the error "Fatal: Declation of generic class inside another generic class is not allowed".<br><br></div><div class="gmail_extra">Best regards<br></div><div class="gmail_extra"><br></div></div></blockquote><div><br></div><div>This is the correct sample:<br><br></div><div>=== CODE BEGIN ===<br><br><span style="font-family:monospace,monospace">unit sample;<br><br>{$MODE delphi}<br><br>interface<br><br>type<br>  TGenericRecord<T> = record<br>  strict private<br>    type<br>      TMockRecord<T> = record // Nested generic declaration<br>      end;<br><br>  public<br>    FValue: T;<br>    procedure SetValue(Value: T);<br>  end;<br><br>implementation<br><br>{ TGenericRecord<T> }<br><br>procedure TGenericRecord<T>.SetValue(Value: T);<br>begin<br>end;<br><br>end.</span><br><br><br></div><div>=== END ===<br><br></div><div>Regards<br></div></div><br></div></div>