Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/objc.dg/property/dynamic-6.m @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* 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