11c982af0SJames Y Knight// RUN: %clang_cc1 -verify -Wno-objc-root-class %s 2*ccc4d83cSJames Y Knight 31c982af0SJames Y Knight@interface XX 41c982af0SJames Y Knight 5*ccc4d83cSJames Y Knight- (void)addObserver:(XX*)o; // expected-note 2{{passing argument to parameter 'o' here}} 61c982af0SJames Y Knight 71c982af0SJames Y Knight@end 81c982af0SJames Y Knight 91c982af0SJames Y Knight@interface YY 101c982af0SJames Y Knight 111c982af0SJames Y Knight+ (void)classMethod; 121c982af0SJames Y Knight 131c982af0SJames Y Knight@end 141c982af0SJames Y Knight 151c982af0SJames Y Knight@implementation YY 161c982af0SJames Y Knight 171c982af0SJames Y Knightstatic XX *obj; 181c982af0SJames Y Knight 191c982af0SJames Y Knight+ (void)classMethod { 20*ccc4d83cSJames Y Knight [obj addObserver:self]; // expected-error {{cannot initialize a parameter of type 'XX *' with an lvalue of type 'Class'}} 211c982af0SJames Y Knight Class whatever; 22*ccc4d83cSJames Y Knight [obj addObserver:whatever]; // expected-error {{cannot initialize a parameter of type 'XX *' with an lvalue of type 'Class'}} 231c982af0SJames Y Knight} 241c982af0SJames Y Knight@end 251c982af0SJames Y Knight 26