Skip to content

TFlexValue missing IInterface implicit operate #144

Description

@VojkoCendak

Hi,
Can you please add missing feature?
problem when .SetParameter('MyInterfacedObjectName', myintfInstance) !
Thank you

{ TFlexValue }

{$IFNDEF FPC}
fDataIntf : IInterface;

class operator Implicit(Value : Pointer) : TFlexValue;
class operator Implicit(Value : Variant) : TFlexValue;
class operator Implicit(Value : TVarRec) : TFlexValue;
class operator Implicit(Value: IInterface): TFlexValue; // MISSING
class operator Equal(a : TFlexValue; b : string) : Boolean;
class operator Equal(a : TFlexValue; b : Integer) : Boolean;
class operator Equal(a : TFlexValue; b : Int64) : Boolean;

@@ -1301,4 +1302,9 @@ begin
Value := aValue;
end;

class operator TFlexValue.Implicit(Value: IInterface) : TFlexValue;
begin
result.AsInterface := Value;
end;

end.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions