blob: 11b02c1c1701a26bfae8d8a6c25a921ebe8ccea4 [file] [log] [blame]
Fariborz Jahanian83b7b312010-01-18 22:59:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3@interface G
4@end
5
6@interface F
7- (void)bar:(id *)objects;
8- (void)foo:(G**)objects;
9@end
10
11
12void a() {
13 F *b;
14 G **keys;
15 [b bar:keys];
16
17 id *PID;
18 [b foo:PID];
19
20}
21
Fariborz Jahanian2e2acec2010-08-21 00:10:36 +000022
23// pr7936
24@interface I1 @end
25
26class Wrapper {
27public:
28 operator id() const { return (id)_value; }
29 operator Class() const { return (Class)_value; }
30 operator I1*() const { return (I1*)_value; }
31
32 bool Compare(id obj) { return *this == obj; }
33 bool CompareClass(Class obj) { return *this == obj; }
34 bool CompareI1(I1* obj) { return *this == obj; }
35
36private:
37 long _value;
38};
39