pascalabcnet/TestSuite/lambdas_generics6.pas
Ivan Bondarev 4db76663d1 #2328
2021-01-06 14:20:07 +01:00

10 lines
300 B
ObjectPascal

uses System, System.Collections.Generic;
procedure p<X, Y> (b: Func<IEnumerable<Y>, X>; c: Y);
begin
assert(b.GetType().ToString() = 'System.Func`2[System.Collections.Generic.IEnumerable`1[System.Int32],System.Collections.Generic.IEnumerable`1[System.Int32]]');
end;
begin
p(x -> x, 5);
end.