pascalabcnet/TestSuite/CompilationSamples/Program87.pas
Бондарев Иван 97b517e798 bug fix #1890
2019-03-28 20:19:41 +01:00

32 lines
678 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
t0<T> = class end;
t1 = class(t0<byte>)
procedure p1;
begin
//обязательно лямбда
var p: procedure := ()->
begin
end;
//обязательно цикл for, loop или foreach
//достаточно оставить 1 из следующих 3 строк чтоб воспроизвелось:
for var i := 0 to 0 do
p;
foreach var o in Arr(0) do;
loop 0 do;
//а с repeat и while не воспроизводится:
//while false do;
//repeat until true;
end;
end;
begin
var o := new t1;
o.p1;
end.