Sema: Don't try to initialize static properties in implicit constructors.

The implicit default constructor shouldn't try to initialize static properties, and the implicit memberwise constructor shouldn't have arguments for static properties.

Swift SVN r10378
This commit is contained in:
Joe Groff
2013-11-12 22:10:15 +00:00
parent 01b38f6929
commit b64d601bba
4 changed files with 26 additions and 3 deletions

View File

@@ -493,6 +493,8 @@ void PrintAST::visitExtensionDecl(ExtensionDecl *decl) {
void PrintAST::visitPatternBindingDecl(PatternBindingDecl *decl) {
recordDeclLoc(decl);
if (decl->isStatic())
OS << "static ";
OS << "var ";
printPattern(decl->getPattern());
if (Options.VarInitializers) {