| 1 |
// RUN: %clang_cc1 -x objective-c -fsyntax-only -Wno-objc-root-class -verify %s |
| 2 |
|
| 3 |
int GV = 42; |
| 4 |
|
| 5 |
@interface A |
| 6 |
+ (int) getGV; |
| 7 |
- (instancetype)init:(::A *) foo; // expected-error {{expected a type}} |
| 8 |
@end |
| 9 |
|
| 10 |
@implementation A |
| 11 |
- (void)performSelector:(SEL)selector {} |
| 12 |
- (void)double:(int)firstArg :(int)secondArg colon:(int)thirdArg {} |
| 13 |
- (void)test { |
| 14 |
// The `::` below should not trigger an error. |
| 15 |
[self performSelector:@selector(double::colon:)]; |
| 16 |
} |
| 17 |
+ (int) getGV { return ::GV; } // expected-error {{expected a type}} |
| 18 |
- (instancetype)init:(::A *) foo { return self; } // expected-error {{expected a type}} |
| 19 |
@end |