blob: 560c1a14a5d745d7989c56cf06f283efd3a9903b [file] [log] [blame]
// RUN: %clang_cc1 -verify -Wno-objc-root-class %s
// FIXME: expected-no-diagnostics
@interface XX
- (void)addObserver:(XX*)o; // FIXME -- should note 2{{passing argument to parameter 'o' here}}
@end
@interface YY
+ (void)classMethod;
@end
@implementation YY
static XX *obj;
+ (void)classMethod {
[obj addObserver:self]; // FIXME -- should error {{cannot initialize a parameter of type 'XX *' with an lvalue of type 'Class'}}
Class whatever;
[obj addObserver:whatever]; // FIXME -- should error {{cannot initialize a parameter of type 'XX *' with an lvalue of type 'Class'}}
}
@end