diff options
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 3 | ||||
-rw-r--r-- | test/SemaObjC/method-lookup-3.m | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index df970411e7..f718ea3fd9 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -863,8 +863,7 @@ Sema::OwningExprResult Sema::BuildInstanceMessage(ExprArg ReceiverE, if (!Method) { // Handle messages to id. - bool receiverIsId = (ReceiverType->isObjCIdType() || - ReceiverType->isObjCQualifiedIdType()); + bool receiverIsId = ReceiverType->isObjCIdType(); if (receiverIsId || ReceiverType->isBlockPointerType() || (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) { Method = LookupInstanceMethodInGlobalPool(Sel, diff --git a/test/SemaObjC/method-lookup-3.m b/test/SemaObjC/method-lookup-3.m index 18a9982840..882b3d1d21 100644 --- a/test/SemaObjC/method-lookup-3.m +++ b/test/SemaObjC/method-lookup-3.m @@ -50,3 +50,8 @@ void f4(id a0, Abstract *a1) { void f5(id a0, Abstract *a1) { [ a0 setZ: a1]; } + +// pr7861 +void f6(id<A> a0) { + Abstract *l = [a0 x]; +} |