pascalabcnet/TestSuite/patterns/patterns-is-nested-if.pas

10 lines
245 B
ObjectPascal
Raw Permalink Normal View History

2018-05-18 18:18:38 +03:00
begin
var a:='asd';
if (a is string(var s)) and (s is string(var s1)) then
if (s1 is string(var s2)) and (s2 is string(var s3)) and (s3 = 'asd') then
2018-05-18 18:18:38 +03:00
Assert(s3 = 'asd')
else
Assert(false)
else
Assert(false);
end.