pascalabcnet/TestSuite/implicitInInit.pas
Mikhalkovich Stanislav 4d5a1c458c fix #2220
2020-03-31 11:05:32 +03:00

16 lines
263 B
ObjectPascal

type
MyString = class
public
d: string;
static function operator implicit(s: string): MyString;
begin
Result := new MyString;
Result.d := s;
end;
end;
begin
var s: MyString := 'abcde';
Assert(s.d = 'abcde');
end.