1 // { dg-do compile }
2 
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 29 Dec 2001 <nathan@codesourcery.com>
5 
6 // PR 5213. We failed to spot that class List was a template, rather
7 // than a non-template or specialization
8 
9 
10 template <class T> class vector { };
11 
12 class OUTER {
13   public:
14   template <class T>
15   class List { };
16 
17   vector<class List> data; // { dg-error "invalid|required|ISO C" }
18 };
19 
20 template <class T>
21 class List { };
22 
23 // This next line should just do a lookup of 'class List', and then
24 // get a type/value mismatch. Instead we try and push 'class List'
25 // into the global namespace and get a redeclaration error.
26 vector<class List > data;	// { dg-error "invalid|required|declaration" }
27