pascalabcnet/CodeExamples/Patterns/patterns-switch.pas
miks1965 987ab845e8 fix #1409
Разрешил перегруженные деконструкторы
2018-10-21 12:29:36 +03:00

8 lines
189 B
ObjectPascal

begin
var a := new List<integer>(arr(1, 2));
match a with
integer(var c): write(1);
boolean(var s): write(2);
List<integer>(var l) when l.Count > 0 : write(3)
end;
end.