From bf55ba177bb2745aeef46667462ab6ba05354f56 Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 3 Oct 2015 15:24:29 +0000 Subject: [PATCH] Ide: Assist++: Fixed issue with class::method case #1276 git-svn-id: svn://ultimatepp.org/upp/trunk@8974 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CppBase/Expression.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/uppsrc/CppBase/Expression.cpp b/uppsrc/CppBase/Expression.cpp index 73c0e64d6..86a23b4d1 100644 --- a/uppsrc/CppBase/Expression.cpp +++ b/uppsrc/CppBase/Expression.cpp @@ -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& 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 base = GetTypeBases(type);