pascalabcnet/TestSuite/ugl1.pas

15 lines
185 B
ObjectPascal
Raw Permalink Normal View History

2020-06-18 10:06:30 +03:00
// #2262
type t1 = class
end;
function f1<T>(self: t1): t1; extensionmethod;
begin
Result := self;
end;
begin
var a := new t1;
var b := a.f1&<byte>;
Assert(a=b);
end.