fix a stack overflow bug in intellisense
This commit is contained in:
parent
10fd2602aa
commit
da87ce6c14
|
|
@ -384,7 +384,12 @@ namespace CodeCompletion
|
|||
tmp_ts = tmp_ts.baseScope;
|
||||
}
|
||||
if (ts.implemented_interfaces != null && !(ts is ArrayScope && !(ts as ArrayScope).is_dynamic_arr))
|
||||
foreach (TypeScope int_ts in ts.implemented_interfaces)
|
||||
{
|
||||
List<TypeScope> implemented_interfaces = new List<TypeScope>();
|
||||
implemented_interfaces.AddRange(ts.implemented_interfaces);
|
||||
if (ts is ArrayScope)
|
||||
implemented_interfaces.Add((ts as ArrayScope).ilist);
|
||||
foreach (TypeScope int_ts in implemented_interfaces)
|
||||
{
|
||||
TypeScope int_ts2 = int_ts;
|
||||
if (int_ts is CompiledScope && (int_ts as CompiledScope).CompiledType.IsGenericType && !(int_ts as CompiledScope).CompiledType.IsGenericTypeDefinition)
|
||||
|
|
@ -410,6 +415,8 @@ namespace CodeCompletion
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (this.used_units != null)
|
||||
for (int i = 0; i < this.used_units.Count; i++)
|
||||
{
|
||||
|
|
@ -443,7 +450,7 @@ namespace CodeCompletion
|
|||
|
||||
public void AddUsedUnit(SymScope unit)
|
||||
{
|
||||
//if (!hasUsesCycle(unit))
|
||||
if (this.si.name != "PABCSystem")
|
||||
used_units.Add(unit);
|
||||
}
|
||||
|
||||
|
|
@ -2912,6 +2919,7 @@ namespace CodeCompletion
|
|||
public TypeScope[] indexes;
|
||||
private bool _is_dynamic_arr = false;
|
||||
private bool _is_multi_dyn_arr = false;
|
||||
internal TypeScope ilist;
|
||||
|
||||
public ArrayScope()
|
||||
{
|
||||
|
|
@ -2945,6 +2953,7 @@ namespace CodeCompletion
|
|||
lst.Add(elementType);
|
||||
this.implemented_interfaces = new List<TypeScope>();
|
||||
this.implemented_interfaces.Add(CompiledScope.get_type_instance(typeof(IEnumerable<>), lst));
|
||||
ilist = CompiledScope.get_type_instance(typeof(IList<>), lst);
|
||||
//this.implemented_interfaces.Add(CompiledScope.get_type_instance(typeof(IList<>), lst));
|
||||
}
|
||||
this.si = new SymInfo("$" + this.ToString(), SymbolKind.Type, this.ToString());
|
||||
|
|
|
|||
BIN
VisualPascalABCNET/Resources/openclosed.png
Normal file
BIN
VisualPascalABCNET/Resources/openclosed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Loading…
Reference in a new issue