Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s |
Fariborz Jahanian | 7f89047 | 2009-09-02 00:05:10 +0000 | [diff] [blame] | 2 | |
| 3 | @interface NSView |
| 4 | - (id)initWithView:(id)realView; |
| 5 | @end |
| 6 | |
| 7 | @implementation NSView |
| 8 | - (id)initWithView:(id)realView { |
Fariborz Jahanian | 57dae1a | 2010-08-16 21:51:12 +0000 | [diff] [blame] | 9 | *(NSView *)self = *(NSView *)realView; // expected-error {{cannot assign to class object in non-fragile ABI}} |
Fariborz Jahanian | 7f89047 | 2009-09-02 00:05:10 +0000 | [diff] [blame] | 10 | } |
| 11 | @end |
| 12 | |