Community
Participate
Working Groups
Hi, as I've already mentioned in Bug #414450 I suspect that the bugfix has introduced a new issue. When I try to use code assist an Exception gets thrown. When you look at the example code below, the problem arises whenever C is a class template, a normal class is not hit by the bug. Further, the exception is only thrown when at least one template alias is declared inside C; remove declaration of E and everything is fine again. >>>>> Example Code <<<<<< struct A {}; template<typename _T_> struct B {}; template<typename _A_> struct C { using D = _A_; template<typename _T_> using E = B<_T_>; // this is causing the trouble }; void test() { C<A>:: // <-- outch, throws exception shown below } >>>>> Exception <<<<<< java.lang.IllegalArgumentException: E is not a member of C at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.invalidMember(ClassTypeHelper.java:1007) at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getVisibility(ClassTypeHelper.java:923) at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassTemplate.getVisibility(CPPClassTemplate.java:257) at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.AccessContext.isAccessible(AccessContext.java:93) at org.eclipse.cdt.internal.ui.text.contentassist.DOMCompletionProposalComputer.computeCompletionProposals(DOMCompletionProposalComputer.java:144) at org.eclipse.cdt.internal.ui.text.contentassist.ParsingBasedProposalComputer.computeCompletionProposals(ParsingBasedProposalComputer.java:56) at org.eclipse.cdt.internal.ui.text.contentassist.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:294) at org.eclipse.cdt.internal.ui.text.contentassist.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:261) at org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:275) at org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:228) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1839) ....
Fixed by commit http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=19db352cb98a7ae83f4e817dbf88fe93683bfe44.
*** cdt git genie on behalf of Sergey Prigogin *** Bug 418479 - IllegalArgumentException on template alias member of template class [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=19db352cb98a7ae83f4e817dbf88fe93683bfe44