diff options
Diffstat (limited to 'test/SemaTemplate/nested-template.cpp')
-rw-r--r-- | test/SemaTemplate/nested-template.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaTemplate/nested-template.cpp b/test/SemaTemplate/nested-template.cpp index 01ede32f9a08b..ab647aa226757 100644 --- a/test/SemaTemplate/nested-template.cpp +++ b/test/SemaTemplate/nested-template.cpp @@ -125,4 +125,20 @@ X2<int>::Inner<X2_arg> x2i1; X2<float> x2a; // expected-note{{instantiation}} X2<long>::Inner<X2_arg> x2i3; // expected-error{{template template argument has different}} +namespace PR10896 { + template<typename TN> + class Foo { + + public: + void foo() {} + private: + + template<typename T> + T SomeField; // expected-error {{member 'SomeField' declared as a template}} + }; + void g() { + Foo<int> f; + f.foo(); + } +} |