diff options
Diffstat (limited to 'test/SemaObjC/protocol-id-test-2.m')
-rw-r--r-- | test/SemaObjC/protocol-id-test-2.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaObjC/protocol-id-test-2.m b/test/SemaObjC/protocol-id-test-2.m new file mode 100644 index 0000000000..525d2cca9e --- /dev/null +++ b/test/SemaObjC/protocol-id-test-2.m @@ -0,0 +1,14 @@ +// RUN: clang -verify %s + +@protocol P +@end + +@interface INTF<P> +- (void)IMeth; + - (void) Meth; +@end + +@implementation INTF +- (void)IMeth { [(id<P>)self Meth]; } // expected-warning {{method '-Meth' not found in protocol (return type defaults to 'id')}} +- (void) Meth {} +@end |