blob: c4388a7c155666848bd079fc8120b462c96d5d4b [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Douglas Gregor7f43d672009-02-25 23:52:28 +00002namespace N {
Douglas Gregor2943aed2009-03-03 04:44:36 +00003 template<typename T> class A { };
Douglas Gregor7f43d672009-02-25 23:52:28 +00004
5 template<> class A<int> { };
6
Douglas Gregor24c46b32009-03-19 04:25:59 +00007 template<> class A<float>; // expected-note{{forward declaration of 'class N::A<float>'}}
Douglas Gregor2943aed2009-03-03 04:44:36 +00008
Douglas Gregor7f43d672009-02-25 23:52:28 +00009 class B : public A<int> { };
10}
11
12class C1 : public N::A<int> { };
13
Douglas Gregor2943aed2009-03-03 04:44:36 +000014class C2 : public N::A<float> { }; // expected-error{{base class has incomplete type}}
Douglas Gregor7f43d672009-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}