Ryan Joseph
2018-11-09 04:47:42 UTC
I’m getting a parse error here. It thinks the “U” is another type but in fact it’s another generic parameter and not related to “T” at all. Is this a bug? I don’t think the way the parsing works the compiler actually can discern this condition.
{$mode objfpc}
{$modeswitch advancedrecords}
program generic_constants_restricted;
type
generic TList<T:tobject, U> = record
end;
begin
end.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bi
{$mode objfpc}
{$modeswitch advancedrecords}
program generic_constants_restricted;
type
generic TList<T:tobject, U> = record
end;
begin
end.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bi