pascalabcnet/TestSuite/implicitexplicit8.pas
Ivan Bondarev e402243f2d #2311
2021-01-07 20:31:51 +01:00

15 lines
247 B
ObjectPascal

var o: System.Type;
type
t1 = class
static function operator implicit<T>(val: T): t1;
begin
o := typeof(T);
end;
end;
t2<T> = class end;
begin
var a: t1 := new t2<integer>;
assert(o = typeof(t2<integer>));
end.