1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3template<typename T>
4struct X {
5  template<typename U> struct Inner { };
6
7  template<typename U> void f(T, U) { }
8};
9
10template<> template<typename U>
11struct X<int>::Inner {
12  U member;
13};
14
15template<> template<typename U>
16void X<int>::f(int x, U y) {
17  x = y; // expected-error{{incompatible type}}
18}
19
20void test(X<int> xi, X<long> xl, float *fp) {
21  X<int>::Inner<float*> xii;
22  xii.member = fp;
23  xi.f(17, 25);
24  xi.f(17, 3.14159);
25  xi.f(17, fp); // expected-note{{instantiation}}
26  X<long>::Inner<float*> xli;
27
28  xli.member = fp; // expected-error{{no member}}
29  xl.f(17, fp); // okay
30}
31