Explicit and Implicit conversion of Custom Variants to simple types fails
Summary
As per title.
try
WriteLn('Value of v: ', Integer(v));
except
WriteLn('Explict Conversion to Integer failed!');
end;
try
WriteLn('Value of 1 + v: ', IntToStr(1 + v));
except
WriteLn('Implicit Conversion to Integer failed!');
end;
Both the above fail, when v is a custom variant, without making any calls to Cast or CastTo.
They work when v is normal variant. They also work in Delphi.
Example Project
Example project attached.example.zip