xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/deref-interface.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc@interface NSView
4*f4a2713aSLionel Sambuc  - (id)initWithView:(id)realView;
5*f4a2713aSLionel Sambuc@end
6*f4a2713aSLionel Sambuc
7*f4a2713aSLionel Sambuc@implementation NSView
8*f4a2713aSLionel Sambuc - (id)initWithView:(id)realView {
9*f4a2713aSLionel Sambuc     *(NSView *)self = *(NSView *)realView;	// expected-error {{cannot assign to class object}}
10*f4a2713aSLionel Sambuc }
11*f4a2713aSLionel Sambuc@end
12*f4a2713aSLionel Sambuc
13