The following code produces errors:
(E310) Type expected.
List<T> = public class mapped to
System.Collections.Generic.List<T>
private
method GetItem(AIndex: Integer): T;
method SetItem(AIndex: Integer; AValue: T);
public
property Items[AIndex: Integer]: T read GetItem write SetItem; default;
end;
Class1 = public class
public
property Prop1: PropertyEditorClass;
property Prop2: List<Class2>;
property Prop3[AIndex: Integer]: PropertyEditorClass;
end;
Class2 = public class
public
property Prop1: PropertyEditorClass;
end;
PropertyEditorClass = public class of PropertyEditor;
PropertyEditor = public class
end;
implementation
method List<T>.GetItem(AIndex: Integer): T;
begin
Result := mapped.Item[AIndex];
end;
method List<T>.SetItem(AIndex: Integer; AValue: T);
begin
mapped.Item[AIndex] := AValue;
end;
constructor Window1;
begin
InitializeComponent();
var aa := new Class1;
var bb := new aa.Prop1; // Ok
var cc := new aa.Prop2[1].Prop1; // not Ok
var dd := new aa.Prop3[0]; // not Ok
end;
I attached project and screenshot.
Bug179.rar (140.3 KB)
Best regards,
Jose A.