[cfe-commits] r50589 - /cfe/trunk/test/Sema/objc-property-5.m
Fariborz Jahanian
fjahanian at apple.com
Fri May 2 14:09:41 PDT 2008
Author: fjahanian
Date: Fri May 2 16:09:40 2008
New Revision: 50589
URL: http://llvm.org/viewvc/llvm-project?rev=50589&view=rev
Log:
Another test case for properties in protocols.
Added:
cfe/trunk/test/Sema/objc-property-5.m
Added: cfe/trunk/test/Sema/objc-property-5.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/objc-property-5.m?rev=50589&view=auto
==============================================================================
--- cfe/trunk/test/Sema/objc-property-5.m (added)
+++ cfe/trunk/test/Sema/objc-property-5.m Fri May 2 16:09:40 2008
@@ -0,0 +1,31 @@
+// RUN: clang -verify %s
+
+ at protocol P1 @end
+ at protocol P2 @end
+ at protocol P3 @end
+
+ at interface NSData @end
+
+ at interface MutableNSData : NSData @end
+
+ at interface Base : NSData <P1>
+ at property(readonly) id ref;
+ at property(readonly) Base *p_base;
+ at property(readonly) NSData *nsdata;
+ at property(readonly) NSData * m_nsdata;
+ at end
+
+ at interface Data : Base <P1, P2>
+ at property(readonly) NSData *ref; // expected-warning {{property type 'NSData *' does not match property type inherited from 'Base'}}
+ at property(readonly) Data *p_base; // expected-warning {{property type 'Data *' does not match property type inherited from 'Base'}}
+ at property(readonly) MutableNSData * m_nsdata; // expected-warning {{property type 'MutableNSData *' does not match property type inherited from 'Base'}}
+ at end
+
+ at interface MutedData: Data
+ at property(readonly) id p_base; // expected-warning {{property type 'id' does not match property type inherited from 'Data'}}
+ at end
+
+ at interface ConstData : Data <P1, P2, P3>
+ at property(readonly) ConstData *p_base; // expected-warning {{property type 'ConstData *' does not match property type inherited from 'Data'}}
+ at end
+
More information about the cfe-commits
mailing list