Восстановил три теста is_var

This commit is contained in:
Mikhalkovich Stanislav 2020-07-11 17:12:51 +03:00
parent 2eddbb8f15
commit f26fcbba63
3 changed files with 56 additions and 0 deletions

18
TestSuite/isvar2.pas Normal file
View file

@ -0,0 +1,18 @@
function f1(o: object): sequence of object;
begin
//var c := o is object(var a);
if o is object(var a) then
begin
// var b := a;
// Writeln(a); // object
yield a;
Assert(a <> nil); // nil
// Writeln(b); // object
// b := b;
end;
end;
begin
foreach var o in f1(new object) do
end.

19
TestSuite/isvar3.pas Normal file
View file

@ -0,0 +1,19 @@
function f1(o: object): sequence of object;
begin
//var c := o is object(var a);
if o is object(var a) then
//begin
// var b := a;
// Writeln(a); // object
yield a;
//Assert(a <> nil); // nil
// Writeln(b); // object
// b := b;
//end;
end;
begin
foreach var o in f1(new object) do
Assert(o<>nil)
end.

19
TestSuite/isvar4.pas Normal file
View file

@ -0,0 +1,19 @@
function f1(o: object): sequence of object;
begin
var c := o is object(var a);
//if o is object(var a) then
//begin
// var b := a;
// Writeln(a); // object
yield a;
Assert(a <> nil); // nil
// Writeln(b); // object
// b := b;
//end;
end;
begin
foreach var o in f1(new object) do
end.