pascalabcnet/TestSuite/lock_in_lambda_in_yield.pas
Mikhalkovich Stanislav 75ef577703 fix #1985
2019-06-21 20:32:01 +03:00

16 lines
282 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function f1: sequence of byte; //Ошибка: Функции с yield не могут содержать блоков try..except и try..finally
begin
yield 0;
var p: procedure := ()->
begin
lock(new object) do
begin
end;
end;
end;
begin
end.