blob: 23a7a890582dc43154d369dcb23bdfe8218ade88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
/* { dg-do compile } */
/* Test case when an accessor from a @property matches a method
required by a protocol. If the @property is @dynamic, then no
warning should be generated. */
#include <objc/objc.h>
#include <objc/runtime.h>
#include <stdlib.h>
@protocol Count
- (int) count;
@end
@interface MyRootClass <Count>
{
Class isa;
}
@property int count;
@end
@implementation MyRootClass
/* This @dynamic turns off any warnings for -count and -setCount:. */
@dynamic count;
@end
|