pascalabcnet/TestSuite/yield_lambda_with_foreach.pas

12 lines
176 B
ObjectPascal
Raw Permalink Normal View History

2019-06-28 11:26:02 +03:00
function f1: sequence of string;
begin
var p: ()->() := procedure->
begin
foreach var i in Arr(0) do;
end;
yield 'a';
end;
begin
Assert(f1.First = 'a');
end.