fpc/tests/webtbs/tw31076.pp
svenbarth d499163ef5 * provisional fix for Mantis : fail gracefully instead of with an internal error if a generic method is declared inside a generic class or record. This will change once we support nested generics however.
* adjusted error message to reflect that we're not only dealing with generic classes
+ added test; note: it's added in webtbs, cause the test will loose its %FAIL attribute in the future

git-svn-id: trunk@35079 -
2016-12-06 22:26:53 +00:00

20 lines
214 B
ObjectPascal

{ %FAIL }
program tw31076;
{$mode objfpc}
type
generic TFClass<TC> = class
generic function Res<TF>(): TF; // <<--
end;
generic function TFClass.Res<TF>: TF;
begin
end;
begin
end.