OSDN Git Service

PR target/57264
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / obj-c++.dg / template-7.mm
1 // Test that objective-c++ does not confuse a template parameter named 'Object'
2 // with an interface of the same name.
3 // Author: Fariborz Jahanian <fjahanian@apple.com>
4 // { dg-do compile }
5 // { dg-options "" }
6 typedef struct objc_class *Class;
7
8 @interface Object
9 {
10  Class isa;
11 }
12 @end
13
14 template <class Object>
15 struct pyobject_type
16
17     static Object* checked_downcast(Object* x)
18     {
19         return x;
20     }
21 };