http://llvm.org/bugs/show_bug.cgi?id=19682
Bug ID: 19682
Summary: Availability attributes ignored for Objective-C
subscript access
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
In the code below, I should get an error on the use of
-objectForKeyedSubscript: via the subscript operator, but I don't. This also
applies to __attribute__((deprecated)) and the various forms of
__attribute__((availability)).
@interface Subscriptable
- (id)objectForKeyedSubscript:(id)sub __attribute__((unavailable));
@end
id test(Subscriptable *obj) {
return obj[obj]; // no error here!
}
id control(Subscriptable *obj) {
return [obj objectForKeyedSubscript:obj]; // error as expected
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs