1 | // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-runtime=macosx-fragile-10.5 -verify -Wno-objc-root-class %s |
---|---|
2 | // rdar://10731065 |
3 | |
4 | @interface MyView {} |
5 | @end |
6 | |
7 | @implementation MyViewTemplate // expected-warning {{cannot find interface declaration for 'MyViewTemplate'}} |
8 | - (id) createRealObject { |
9 | id realObj; |
10 | *(MyView *) realObj = *(MyView *) self; // expected-error {{cannot assign to class object}} |
11 | } |
12 | @end |
13 | |
14 |