Fariborz Jahanian | b8f17ab | 2011-04-12 23:39:33 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -verify %s |
| 2 | // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -verify %s |
| 3 | // rdar://9154582 |
| 4 | |
| 5 | @interface Blocky @end |
| 6 | |
| 7 | @implementation Blocky { |
| 8 | int _a; |
| 9 | } |
| 10 | - (void)doAThing { |
| 11 | ^{ |
| 12 | char self; // expected-note {{declared here}} |
| 13 | _a; // expected-error {{instance variable '_a' cannot be accessed because 'self' has been redeclared}} |
| 14 | }(); |
| 15 | } |
| 16 | |
| 17 | @end |
| 18 | |