pascalabcnet/TestSuite/implicitexplicit6.pas

16 lines
235 B
ObjectPascal
Raw Permalink Normal View History

2021-01-06 22:47:39 +03:00
type
t0<T> = class
static function operator implicit(o: T): t0<T> := nil;
end;
t1 = class(t0<byte>) end;
procedure p1<T>(q: t0<T>);
begin
assert(q <> nil);
end;
begin
var prog_Q: t1 := new t1;
p1(prog_Q);
end.