2009-01-21 07:17:32 +08:00
|
|
|
// RUN: clang -analyze -warn-objc-methodsigs -verify %s
|
2008-07-12 06:40:47 +08:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
@interface MyBase
|
|
|
|
-(long long)length;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface MySub : MyBase{}
|
|
|
|
-(double)length;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MyBase
|
|
|
|
-(long long)length{
|
|
|
|
printf("Called MyBase -length;\n");
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MySub
|
|
|
|
-(double)length{ // expected-warning{{types are incompatible}}
|
|
|
|
printf("Called MySub -length;\n");
|
|
|
|
return 3.3;
|
|
|
|
}
|
|
|
|
@end
|