aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-09-24 00:56:59 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-09-24 00:56:59 +0000
commita4b984d8396724a8e1137c22186c558c0cb0bf3f (patch)
tree1b4ef69501f91c2bfb99094a5d8a1dd34793e663 /lib/Sema/SemaObjCProperty.cpp
parent10efbaf8632e61e7d329a98c71641d1e839dfa4c (diff)
objc - redeclaration of property in extension class
must match property type declaration in its primary class. // rdar://10142679 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 2bb54560b7..6284f36e41 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -235,7 +235,13 @@ Sema::HandlePropertyInClassExtension(Scope *S,
/* lexicalDC = */ CDecl);
return PDecl;
}
-
+ if (PIDecl->getType().getCanonicalType()
+ != PDecl->getType().getCanonicalType()) {
+ Diag(AtLoc,
+ diag::error_type_mismatch_continuation_class) << PDecl->getType();
+ Diag(PIDecl->getLocation(), diag::note_property_declare);
+ }
+
// The property 'PIDecl's readonly attribute will be over-ridden
// with continuation class's readwrite property attribute!
unsigned PIkind = PIDecl->getPropertyAttributesAsWritten();