Fariborz Jahanian | b5ff6bf | 2009-05-22 21:42:52 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %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 |