This commit is contained in:
Бондарев Иван 2018-10-14 12:47:33 +02:00
parent 8207b5f481
commit fdcf31425a
2 changed files with 18 additions and 3 deletions

View file

@ -3998,7 +3998,7 @@ namespace CodeCompletion
ts.loc = this.loc;
for (int i = 0; i < gen_args.Count; i++)
{
ts.AddGenericParameter(gen_args[i].si.name);
ts.AddGenericInstanceParameter(gen_args[i].si.name);
ts.AddGenericInstanciation(gen_args[i]);
}
ts.si.name = this.si.name;
@ -4024,14 +4024,14 @@ namespace CodeCompletion
if (string.Compare(gen_arg.original_type.generic_params[j], this.generic_params[j], true) == 0)
{
new_gen_args.Add(gen_arg.instances[j]);
ts.AddGenericParameter(gen_arg.instances[j].si.name);
ts.AddGenericInstanceParameter(gen_arg.instances[j].si.name);
ts.AddGenericInstanciation(gen_arg.instances[j]);
}
}
}
else
{
ts.AddGenericParameter(gen_args[i].si.name);
ts.AddGenericInstanceParameter(gen_args[i].si.name);
ts.AddGenericInstanciation(gen_args[i]);
new_gen_args.Add(gen_args[i]);
}
@ -4139,6 +4139,12 @@ namespace CodeCompletion
AddName(name, new TemplateParameterScope(name, TypeTable.obj_type, this));
}
public virtual void AddGenericInstanceParameter(string name)
{
if (generic_params == null) generic_params = new List<string>();
generic_params.Add(name);
}
public virtual void AddImplementedInterface(TypeScope type)
{
if (implemented_interfaces == null) implemented_interfaces = new List<TypeScope>();

View file

@ -0,0 +1,9 @@
type
TClass = class
end;
T1 = class(I1<TClass{@class TClass@}>)
end;
begin
end.