Debian Codegraph @

gcc/testsuite/obj-c++.dg/template-7.mm

raw
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 <[email protected]>
4 // { dg-do compile }
5 // { dg-options "" }
6 // { dg-additional-options "-Wno-objc-root-class" }
7 typedef struct objc_class *Class;
8
9 @interface Object
10 {
11 Class isa;
12 }
13 @end
14
15 template <class Object>
16 struct pyobject_type
17 {
18 static Object* checked_downcast(Object* x)
19 {
20 return x;
21 }
22 };