blob: 5499c50a949f930b5762542442fba396b0e52c71 [file] [log] [blame]
Douglas Gregor7bbed2a2009-02-25 23:52:28 +00001// RUN: clang -fsyntax-only -verify %s
2namespace N {
Douglas Gregored3a3982009-03-03 04:44:36 +00003 template<typename T> class A { };
Douglas Gregor7bbed2a2009-02-25 23:52:28 +00004
5 template<> class A<int> { };
6
Douglas Gregor04385782009-03-10 18:33:27 +00007 template<> class A<float>; // expected-note{{forward declaration of 'class A<float>'}}
Douglas Gregored3a3982009-03-03 04:44:36 +00008
Douglas Gregor7bbed2a2009-02-25 23:52:28 +00009 class B : public A<int> { };
10}
11
12class C1 : public N::A<int> { };
13
Douglas Gregored3a3982009-03-03 04:44:36 +000014class C2 : public N::A<float> { }; // expected-error{{base class has incomplete type}}
Douglas Gregor7bbed2a2009-02-25 23:52:28 +000015
16struct D1 {
17 operator N::A<int>();
18};
19
20namespace N {
21 struct D2 {
22 operator A<int>();
23 };
24}