Ide: Assist++: Fixed issue with class::method case #1276

git-svn-id: svn://ultimatepp.org/upp/trunk@8974 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-10-03 15:24:29 +00:00
parent 9975bd38eb
commit bf55ba177b

View file

@ -362,6 +362,20 @@ void ExpressionTyper::ExpressionType(bool isptr, const String& ttype, int ii,
}
}
if(typeset.GetCount() == c0 && type.GetCount()) { // try to find id in type - Class::Method case
String type2 = ParseTemplatedType(type, tparam);
const Array<CppItem>& n = GetTypeItems(codebase, type2);
for(int i = 0; i < n.GetCount(); i++) {
const CppItem& m = n[i];
if(m.name == id) {
String t = AddTParams(ResolveReturnType(m, tparam), type);
bool skipfnpars = m.IsCode() && ii + 1 < xp.GetCount() && xp[ii + 1] == "()";
ExpressionType(m.isptr, ResolveTParam(codebase, t, tparam), ii + skipfnpars + 1,
m.IsData() && !m.isptr, lvl + 1);
}
}
}
if(typeset.GetCount() != c0 || IsNull(type))
return;
Vector<String> base = GetTypeBases(type);