using object subscripting without declaring objectForKeyedSubscript:
// rdar://
13333205
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176539
91177308-0d34-0410-b5e6-
96231b3b80d8
// First, convert to an r-value.
ExprResult Res = DefaultFunctionArrayLvalueConversion(E);
if (Res.isInvalid())
- return Owned(E);
+ return ExprError();
E = Res.take();
QualType Ty = E->getType();
ExprResult Res = UsualUnaryConversions(E);
if (Res.isInvalid())
- return Owned(E);
+ return ExprError();
E = Res.take();
// If this is a 'float' or '__fp16' (CVR qualified or typedef) promote to
box = @(ME_foo);
box = @(*(enum ForwE*)p); // expected-error {{incomplete type 'enum ForwE' used in a boxed expression}}
}
+
+// rdar://13333205
+@class NSMutableDictionary;
+
+@interface NSMutableArray
++ (NSMutableArray*) array;
+@end
+
+NSMutableDictionary* mBars;
+
+__attribute((objc_root_class)) @interface rdar13333205 @end
+
+@implementation rdar13333205
+- (void) insertBar:(id)preset ofKind:(id) kind atIndex:(int)index {
+ NSMutableArray* presetArray = mBars[kind] ?: [NSMutableArray array]; // expected-error {{expected method to read dictionary element not found on object of type 'NSMutableDictionary *'}}
+}
+@end