mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
bug 520805 - [codeassist] HeuristicResolver can't resolve enum scope
Change-Id: I8c820bd91c1f5775466697c2e0c63351ce69bcba Signed-off-by: Michael Woski <woskimi@yahoo.de>
This commit is contained in:
parent
e252398ee1
commit
27b467cb11
2 changed files with 18 additions and 0 deletions
|
@ -114,6 +114,8 @@ public class HeuristicResolver {
|
|||
type = SemanticUtil.getNestedType(type, SemanticUtil.PTR);
|
||||
if (type instanceof ICompositeType) {
|
||||
return ((ICompositeType) type).getCompositeScope();
|
||||
} else if (type instanceof ICPPEnumeration) {
|
||||
return ((ICPPEnumeration) type).asScope();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -606,6 +606,22 @@ public class CompletionTests extends CompletionTestBase {
|
|||
assertCompletionResults(new String[] { "i" });
|
||||
}
|
||||
|
||||
// template <typename TPA>
|
||||
// struct A {
|
||||
// enum class AA {
|
||||
// Test
|
||||
// };
|
||||
// };
|
||||
//
|
||||
// template <typename TPB>
|
||||
// void test()
|
||||
// {
|
||||
// A<TPB>::AA::/*cursor*/
|
||||
// }
|
||||
public void testHeuristicEnumScopeResolution_520805() throws Exception {
|
||||
assertCompletionResults(new String[] { "Test" });
|
||||
}
|
||||
|
||||
// template <typename T>
|
||||
// struct A {
|
||||
// template <typename U>
|
||||
|
|
Loading…
Add table
Reference in a new issue