aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Parse/ParseObjc.cpp2
-rw-r--r--test/Parser/objc-init.m18
2 files changed, 20 insertions, 0 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index b998c2e9ea..71aeb30927 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -1202,6 +1202,8 @@ Parser::DeclPtrTy Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {
}
if (Tok.isNot(tok::semi))
Diag(Tok, diag::err_expected_semi_after) << "@synthesize";
+ else
+ ConsumeToken(); // consume ';'
return DeclPtrTy();
}
diff --git a/test/Parser/objc-init.m b/test/Parser/objc-init.m
index a91ac9cf28..6d6b3827d7 100644
--- a/test/Parser/objc-init.m
+++ b/test/Parser/objc-init.m
@@ -39,3 +39,21 @@ void test5(NSNumber *x) {
.x [x METH2] // expected-error {{expected '=' or another designator}}
};
}
+
+// rdar://7370882
+@interface SemicolonsAppDelegate
+{
+ id i;
+}
+@property (assign) id window;
+@end
+
+@implementation SemicolonsAppDelegate
+{
+ id i;
+}
+ @synthesize window;
+@end
+
+
+