mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Bug 402861 - Error involving pointer-to-member of template class
Change-Id: I418b5698757650f86000c31b8b7ea12e0192fcee Reviewed-on: https://git.eclipse.org/r/11034 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
parent
c8e936ae11
commit
0d2decffcf
2 changed files with 16 additions and 1 deletions
|
@ -6212,6 +6212,21 @@ public class AST2TemplateTests extends AST2TestBase {
|
||||||
public void testPointerToMemberAsDependentExpression_391001() throws Exception {
|
public void testPointerToMemberAsDependentExpression_391001() throws Exception {
|
||||||
parseAndCheckBindings(getAboveComment(), CPP, true);
|
parseAndCheckBindings(getAboveComment(), CPP, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// template<typename>
|
||||||
|
// struct A {
|
||||||
|
// char x;
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// typedef A<int> B;
|
||||||
|
//
|
||||||
|
// template <char B::*PtrToMember>
|
||||||
|
// struct C {};
|
||||||
|
//
|
||||||
|
// typedef C<&B::x> T;
|
||||||
|
public void testPointerToMemberOfTemplateClass_402861() throws Exception {
|
||||||
|
parseAndCheckBindings();
|
||||||
|
}
|
||||||
|
|
||||||
// class Memory { };
|
// class Memory { };
|
||||||
// Memory memory;
|
// Memory memory;
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class CPPFieldSpecialization extends CPPSpecialization implements ICPPFie
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ICPPClassType getClassOwner() {
|
public ICPPClassType getClassOwner() {
|
||||||
return getField().getClassOwner();
|
return (ICPPClassType) getOwner();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue