pascalabcnet/TestSuite/nil7.pas
Ivan Bondarev 903e6ed63c #2436
2021-02-21 12:33:51 +01:00

18 lines
218 B
ObjectPascal

type
t0 = class end;
t1 = class
static function operator implicit(p: t0): t1 := new t1;
end;
var obj: t1;
procedure p1(o: t1);
begin
obj := o;
end;
begin
p1(t0(nil));
assert(obj <> nil);
end.