pascalabcnet/TestSuite/operator_implicit_T.pas
Mikhalkovich Stanislav a73085a953 bug fix #1957
2019-05-30 06:56:22 +03:00

14 lines
240 B
ObjectPascal

type
t1<T> = class
static function operator implicit(o: T): t1<T>; begin Assert(2=1); Result := nil; end;
end;
t2<T> = class(t1<T>) end;
procedure p<T>(r: t1<T>);
begin
r := new t2<T>;
end;
begin
p(new t1<integer>);
end.