Jer*_*dge 0 delphi compiler-warnings delphi-xe7 xsuperobject
我TObject在Delphi XE7(Firemonkey)中有几个类(具有属性)AsJson:
uses
System.Classes, System.SysUtils, XSuperObject;
type
TMyObject = class(TObject)
public
property AsJson: ISuperObject read GetAsJson;
end;
Run Code Online (Sandbox Code Playgroud)
但是,编译器会给我这些警告:
[dcc32 Warning] MyUnit.pas(383): W1009 Redeclaration of 'AsJson' hides a member in the base class
Run Code Online (Sandbox Code Playgroud)
我正在寻找基类TObject并且看不到这样的东西,如果我试图使用它也不是一个有效的字段.我在文档中没有看到关于这样一个属性的内容.只有当属性类型是ISuperObject最新版本XSuperObject(至少几周前来自SVN)时才会出现这种情况.我也试过使用类型Integer,我也得到它.
这个警告在我的场景中意味着什么,我该如何摆脱它?
编辑
它似乎只发生在我XSuperObject使用条款中......
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
XSuperObject in 'C:\...\XSuperObject.pas',
XSuperJSON in 'C:\...\XSuperJSON.pas';
type
TMyObject = class(TObject)
private
FTest: Integer;
public
property AsJson: Integer read FTest;
end;
begin
end.
Run Code Online (Sandbox Code Playgroud)
以上示例产生:
[dcc32 Warning] Project1.dpr(17): W1009 Redeclaration of 'AsJson' hides a member in the base class
Run Code Online (Sandbox Code Playgroud)
如果我只是删除XSuperObject,我不会收到此警告.我的XSuperObject副本已有几周了.