brintos

brintos / llvm-project-archived public Read only

0
0
Text · 289 B · 3201412 Raw
13 lines · plain
1// RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s2 3@interface NSView 4  - (id)initWithView:(id)realView;5@end6 7@implementation NSView8 - (id)initWithView:(id)realView {9     *(NSView *)self = *(NSView *)realView;	// expected-error {{cannot assign to class object}}10 }11@end12 13