pascalabcnet/TestSuite/yieldparams.pas
Бондарев Иван f014935bac fix #1638
2019-02-17 14:19:07 +01:00

11 lines
179 B
ObjectPascal

function Get(params x: array of integer): sequence of integer;
begin
yield x[0];
yield x[1];
end;
begin
var a := Get(1,2).ToArray;
assert(a[0] = 1);
assert(a[1] = 2);
end.