pascalabcnet/TestSuite/lambdas_generics7.pas
Бондарев Иван 226ab08fbd fix #1323
2018-10-04 19:52:02 +02:00

19 lines
415 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.

type
t1<T>=class
static p: Action<T>;
end;
procedure p0<T>;
begin
var p1: Action<T>;
p1 := o1->t1&<T>.p(o1);//Ошибка: В данной версии компилятора не поддерживается замыкание данного типа символов
p1(default(T));
end;
var i: integer;
begin
t1&<integer>.p := x -> begin i := 1; end;
p0&<integer>;
assert(i = 1);
end.