pascalabcnet/TestSuite/patterns/patterns-collection-matching1.pas
2019-04-26 20:30:28 +03:00

10 lines
161 B
ObjectPascal

begin
var a := Arr(1,9,8,7,2,3,4,5);
var c : procedure := () -> begin
match a with
[.., 4, var x]: assert(x = 5);
end;
end;
c;
end.