[cfe-commits] r60115 - in /cfe/trunk: lib/Sema/SemaDeclObjC.cpp test/SemaObjC/continuation-class-err.m

Daniel Dunbar daniel at zuster.org
Mon Dec 1 18:27:33 PST 2008


On Wed, Nov 26, 2008 at 12:33 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
> + at property(readonly, assign) id object;
> + at property(readwrite, assign) id object1;
> + at end
> +
> + at interface ReadOnly ()
> + at property(readwrite, copy) id object;  // expected-warning {{property attribute in continuation class does not match the primary class}}
> + at property(readonly) id object1; // expected-error {{use contination class to override 'readonly' property with 'readwrite'}}

I find the wording of this error message confusing (is it a command or
a comment), or perhaps the error message isn't right?

I'm not sure I understand this corner of Objective-C, but isn't the
problem that the continuation class is overriding a readwrite property
with a readonly one? If I am understanding correctly, I think that the
error should be more like the warn_readonly_property diagnostic we
already have, for example:
"continuation class cannot restrict inherited 'readwrite' property"

 - Daniel



More information about the cfe-commits mailing list