pascalabcnet/TestSuite/patterns-deconstruct-default.pas

15 lines
318 B
ObjectPascal
Raw Permalink Normal View History

2018-05-11 19:26:55 +03:00
begin
match 'asd' with
string(s):
match s as object with
2018-05-11 19:26:55 +03:00
integer(i): Assert(false);
string(s1) when s.Length > 1: ;
else Assert(false);
end;
end;
match 'asd' as object with
2018-05-11 19:26:55 +03:00
integer(i): Assert(false);
string(s1) when s1.Length > 3: Assert(false);
end;
end.