diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-03-28 17:56:49 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-03-28 17:56:49 +0000 |
commit | a78eca20429e55b041bffcea1938cd0df07a6ebd (patch) | |
tree | f21a05e69d3519bbf9d801c786ffd87088dabe9e /test/SemaObjCXX/objc-container-subscripting.mm | |
parent | 253955ca25c7e7049963b5db613c0cd15d66e4f8 (diff) |
objective-c: Improve diagnostics and
provide 'fixit' hint when dictionary index
is not of proper type. // rdar://11062080
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153584 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjCXX/objc-container-subscripting.mm')
-rw-r--r-- | test/SemaObjCXX/objc-container-subscripting.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaObjCXX/objc-container-subscripting.mm b/test/SemaObjCXX/objc-container-subscripting.mm index ccbc45e3b4..7591c3b098 100644 --- a/test/SemaObjCXX/objc-container-subscripting.mm +++ b/test/SemaObjCXX/objc-container-subscripting.mm @@ -32,8 +32,8 @@ template void test_dictionary_subscripts(NSMutableDictionary*, id, int); // expe template<typename T, typename U, typename O> void test_array_subscripts(T base, U index, O obj) { - base[index] = obj; // expected-error {{expected method to write dictionary element not found on object of type 'NSMutableArray *'}} - obj = base[index]; // expected-error {{expected method to read dictionary element not found on object of type 'NSMutableArray *'}} + base[index] = obj; // expected-error {{indexing expression is invalid because subscript type 'double' is not an intergal or objective-C pointer type}} + obj = base[index]; // expected-error {{indexing expression is invalid because subscript type 'double' is not an intergal or objective-C pointer type}} } template void test_array_subscripts(NSMutableArray *, int, id); |