Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

No warning (W519, W523) if type is in impl.

 Post Reply Post Reply
Author
Sveinsson Kjaran View Drop Down
New Member
New Member
Avatar

Joined: 18 Nov 2016
Posts: 6
Post Options Post Options   Quote Sveinsson Kjaran Quote  Post ReplyReply Direct Link To This Post Topic: No warning (W519, W523) if type is in impl.
    Posted: 29 Nov 2016 at 11:21am
The following code doesn't get any warning for the types declared in implementation.

unit NoWarningIfTypeIsInImplementation;

interface
type
  IWarning = interface
    procedure SetTime(const AValue: String);
  end;

  TEmptyMethodWarning = class(TInterfacedObject, IWarning)
    procedure SetTime(const AValue: String);
  end;

implementation
type
  INoWarning = interface
    procedure SetTime(const AValue: String);
  end;

  TEmptyMethodNoWarning = class(TInterfacedObject, INoWarning)
    procedure SetTime(const AValue: String);
  end;

procedure TEmptyMethodNoWarning.SetTime(const AValue: String);
begin
end;

procedure TEmptyMethodWarning.SetTime(const AValue: String);
begin
end;

end.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down