forked from qt-creator/qt-creator
C++: nested class with enclosing template class
The parent of instantiation of nested class of template class should be the instantiation of enclosing template class. Task-number: QTCREATORBUG-11752 Change-Id: I8875c738848b85731f5ea88a60da190b4b0ad18f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -2233,6 +2233,22 @@ void CppToolsPlugin::test_completion_data()
|
||||
" double val = @\n"
|
||||
"}\n"
|
||||
) << _("d.constBegin()->") << (QStringList());
|
||||
|
||||
QTest::newRow("nested_class_in_template_class_QTCREATORBUG-11752") << _(
|
||||
"template <typename T>\n"
|
||||
"struct Temp\n"
|
||||
"{\n"
|
||||
" struct Nested1 { T t; };\n"
|
||||
" struct Nested2 { Nested1 n1; };\n"
|
||||
"};\n"
|
||||
"struct Foo { int foo; };\n"
|
||||
"void fun() {\n"
|
||||
" Temp<Foo>::Nested2 n2;\n"
|
||||
" @\n"
|
||||
"}\n"
|
||||
) << _("n2.n1.t.") << (QStringList()
|
||||
<< QLatin1String("foo")
|
||||
<< QLatin1String("Foo"));
|
||||
}
|
||||
|
||||
void CppToolsPlugin::test_completion_member_access_operator()
|
||||
|
||||
Reference in New Issue
Block a user