<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ryan Joseph via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Di., 14. Jan. 2020, 11:26:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is this a bug or intended behavior? I would think there should a type mismatch.<br>
<br>
{$mode delphi}<br>
program test;<br>
<br>
type<br>
TFooA = class<br>
end;<br>
<br>
type<br>
TFooB = class<br>
end;<br>
<br>
type<br>
TList<T: TFooA> = class<br>
procedure Foo;<br>
end;<br>
<br>
procedure TList<T: TFooB>.Foo;<br>
begin<br>
end; <br>
<br>
begin<br>
end.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">It's a bug because constraints should not be allowed in definitions, only in declarations. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>