Generics object and assignment overloading
TMyObject = class
property Value: T;
TIntObject = TMyObject;
obj := TIntObject.Create;
obj := 4; // assigns 4 to obj.value
int := obj; // resulting in Int being 4
Is it possible to do operator overloads which allows the assignments as outlined above? I know this is not housebroken code – but it would help immensely for code simplicity in the specific context that I want to use it in. If possible, what are the pitfalls? (instances will not be persistent or streamed).