aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/template-7.mm
blob: b3697a584a0c2fd2ef0b6bbc063a964539370c1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Test that objective-c++ does not confuse a template parameter named 'Object'
// with an interface of the same name.
// Author: Fariborz Jahanian <fjahanian@apple.com>
// { dg-do compile }
// { dg-options "" }
// { dg-additional-options "-Wno-objc-root-class" }
typedef struct objc_class *Class;

@interface Object
{
 Class isa;
}
@end

template <class Object>
struct pyobject_type
{ 
    static Object* checked_downcast(Object* x)
    {
        return x;
    }
};