Fariborz Jahanian | 8348de3 | 2011-02-08 00:23:07 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Fariborz Jahanian | 1e52dfc | 2011-02-08 18:05:59 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify %s |
Fariborz Jahanian | 8348de3 | 2011-02-08 00:23:07 +0000 | [diff] [blame] | 3 | // rdar://8962253 |
| 4 | |
| 5 | @interface Singleton { |
| 6 | } |
| 7 | + (Singleton*) instance; |
| 8 | @end |
| 9 | |
| 10 | @implementation Singleton |
| 11 | |
| 12 | - (void) someSelector { } |
| 13 | |
| 14 | + (Singleton*) instance { return 0; } |
| 15 | |
| 16 | + (void) compileError |
| 17 | { |
| 18 | [Singleton.instance someSelector]; // clang issues error here |
| 19 | } |
| 20 | |
| 21 | @end |
| 22 | |