Removed a FIXME. Added a test case for anonymous category.

llvm-svn: 60115
This commit is contained in:
Fariborz Jahanian 2008-11-26 20:33:54 +00:00
parent f8ef9f3dc9
commit e7167c28f6
2 changed files with 19 additions and 4 deletions

View File

@ -1251,10 +1251,10 @@ Sema::DeclTy *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc,
*isOverridingProperty = true;
return 0;
}
// else
// FIXME:
// no matching property found in the main class. Must simply
// add this property to the main class's property list.
// No matching property found in the main class. Just fall thru
// and add property to the anonymous category. It looks like
// it works as is. This category becomes just like a category
// for its primary class.
} else {
Diag(CDecl->getLocation(), diag::err_continuation_class);
*isOverridingProperty = true;

View File

@ -0,0 +1,15 @@
// RUN: clang -fsyntax-only -verify %s
@interface ReadOnly
{
id _object;
id _object1;
}
@property(readonly, assign) id object;
@property(readwrite, assign) id object1;
@end
@interface ReadOnly ()
@property(readwrite, copy) id object; // expected-warning {{property attribute in continuation class does not match the primary class}}
@property(readonly) id object1; // expected-error {{use contination class to override 'readonly' property with 'readwrite'}}
@end