cpp: Fixed autocomplete of One<T>-> #1125

git-svn-id: svn://ultimatepp.org/upp/trunk@8565 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-06-20 12:44:17 +00:00
parent 00cfbb6af0
commit 4e8ed111a9

View file

@ -217,6 +217,10 @@ void AssistEditor::ExpressionType(const String& ttype, const String& usings,
for(int i = 0; i < tparam.GetCount(); i++) // need to qualify template parameters
tparam[i] = Qualify(ttype, tparam[i], usings);
bool tryop = id == "->";
if(tryop)
id = "operator->";
if(*id == '.' || (!variable && !iscid(*id))) {
ExpressionType(ttype, usings, xp, ii + 1, typeset, false, lvl + 1);
@ -237,6 +241,12 @@ void AssistEditor::ExpressionType(const String& ttype, const String& usings,
mtype.FindAdd(MakeTuple(ResolveReturnType(m, tparam), m.IsData() && !m.isptr));
}
}
if(mtype.GetCount() == 0 && tryop) {
ExpressionType(ttype, usings, xp, ii + 1, typeset, false, lvl + 1);
return;
}
for(int i = 0; i < mtype.GetCount(); i++)
ExpressionType(ResolveTParam(mtype[i].a, tparam), usings, xp, ii + 1, typeset, mtype[i].b, lvl + 1);