[cfe-commits] r60115 - in /cfe/trunk: lib/Sema/SemaDeclObjC.cpp test/SemaObjC/continuation-class-err.m
Fariborz Jahanian
fjahanian at apple.com
Thu Dec 4 12:53:24 PST 2008
On Dec 1, 2008, at 6:27 PM, Daniel Dunbar wrote:
> 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
Yes. Continuation class can only be used to make a 'readonly' to
'readwrite'
not the other way around.
>
> error should be more like the warn_readonly_property diagnostic we
> already have, for example:
> "continuation class cannot restrict inherited 'readwrite' property"
I just used the gcc text :). OK. I will change the text to be more
clear for clang.
- Fariborz
>
>
> - Daniel
More information about the cfe-commits
mailing list