This commit is contained in:
Бондарев Иван 2017-09-11 21:06:16 +02:00
parent 199e9f42e3
commit 07d35c674a
3 changed files with 24 additions and 5 deletions

View file

@ -443,7 +443,8 @@ namespace CodeCompletion
public void AddUsedUnit(SymScope unit)
{
used_units.Add(unit);
if (!hasUsesCycle(unit))
used_units.Add(unit);
}
public virtual string GetFullName()

View file

@ -0,0 +1,13 @@
type BallInfo = class
x: integer;
end;
begin
var a : array of BallInfo;
a := new BallInfo[2](new BallInfo, new BallInfo);
var s := 0;
a[0].x := 1;
a[1].x := 2;
a.ForEach(x->begin s += x.x end);
assert(s = 3);
end.

View file

@ -1963,15 +1963,20 @@ namespace PascalABCCompiler.TreeRealization
{
return base_generic_instance.ConvertSymbolInfo(si);
}
else if (si == null)
else //if (si == null)
{
if (ImplementingInterfaces != null)
{
foreach (type_node ii_tn in ImplementingInterfaces)
{
si = ii_tn.find_in_type(name, CurrentScope);
if (si != null)
return si;
SymbolInfoList isi = ii_tn.find_in_type(name, CurrentScope);
if (isi != null)
{
if (si == null)
si = isi;
else
si.Add(isi);
}
}
}
}