When using property-dot assignment syntax to call a setter method,
type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105560 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenObjC/dot-syntax-2.m b/test/CodeGenObjC/dot-syntax-2.m
new file mode 100644
index 0000000..020868a
--- /dev/null
+++ b/test/CodeGenObjC/dot-syntax-2.m
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -emit-llvm -o %t %s
+// rdar: // 8062778
+
+@interface NSDictionary @end
+
+@interface NSMutableDictionary : NSDictionary
+@end
+
+@interface MutableMyClass 
+- (NSMutableDictionary *)myDict;
+- (void)setMyDict:(NSDictionary *)myDict;
+
+- (NSMutableDictionary *)myLang;
+- (void)setMyLang:(NSDictionary *)myLang;
+@end
+
+@interface AnotherClass @end
+
+@implementation AnotherClass
+- (void)foo
+{
+    MutableMyClass * myObject;
+    NSDictionary * newDict;
+    myObject.myDict = newDict; 
+    myObject.myLang = newDict;
+}
+@end