mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 10:38:14 +02:00
19 lines
255 B
ObjectPascal
19 lines
255 B
ObjectPascal
{ %NORUN }
|
|
|
|
{$MODE DELPHI}
|
|
|
|
type
|
|
TSmartPtr<T: class> = record
|
|
class operator Implicit(aValue: T): TSmartPtr<T>;
|
|
end;
|
|
|
|
class operator TSmartPtr<T>.Implicit(aValue: T): TSmartPtr<T>;
|
|
begin
|
|
end;
|
|
|
|
var
|
|
sp: TSmartPtr<TObject>;
|
|
begin
|
|
sp := nil;
|
|
end.
|