This commit is contained in:
Ivan Bondarev 2021-12-27 11:05:56 +01:00
parent 0f25d86303
commit eaa95f0d9d
2 changed files with 16 additions and 0 deletions

10
TestSuite/property10.pas Normal file
View file

@ -0,0 +1,10 @@
procedure p2<TList>(l: TList); where TList: IList<integer>;
begin
l.Item[1] := l.Item[0];
l[1] := l[0];
assert(l[1] = 1);
end;
begin
p2(Lst(1,2,3));
end.

View file

@ -1722,6 +1722,12 @@ namespace PascalABCCompiler.TreeRealization
return tn.default_property_node; return tn.default_property_node;
tn = tn.base_type; tn = tn.base_type;
} }
if (this.ImplementingInterfaces != null)
foreach (type_node intf in this.ImplementingInterfaces)
{
if (intf.default_property_node != null)
return intf.default_property_node;
}
return null; return null;
} }
} }