1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
---|---|
2 | |
3 | @interface Foo |
4 | - (char*) foo; |
5 | - (void) bar; |
6 | @end |
7 | |
8 | @implementation Foo |
9 | - (void) bar |
10 | { |
11 | } |
12 | |
13 | - (char*) foo |
14 | { |
15 | char* a,b,c; |
16 | a = (char*)@selector(bar); // expected-error {{cannot type cast @selector expression}} |
17 | return (char*)@selector(bar); // expected-error {{cannot type cast @selector expression}} |
18 | } |
19 | @end |
20 | |
21 |