Allow secondary constructors without body

#KT-6967 Fixed
This commit is contained in:
Denis Zharkov
2015-03-20 12:59:05 +03:00
parent 3f0541924f
commit 01e5ee718f
54 changed files with 390 additions and 153 deletions
@@ -908,7 +908,9 @@ public class JetParsing extends AbstractJetParsing {
emptyDelegationCall.done(CONSTRUCTOR_DELEGATION_CALL);
}
parseBlock();
if (at(LBRACE)) {
parseBlock();
}
}
private void parseThisOrSuper() {
@@ -88,7 +88,7 @@ public class JetSecondaryConstructor extends JetDeclarationStub<KotlinPlaceHolde
@Nullable
@Override
public JetExpression getBodyExpression() {
public JetBlockExpression getBodyExpression() {
return findChildByClass(JetBlockExpression.class);
}
@@ -105,7 +105,7 @@ public class JetSecondaryConstructor extends JetDeclarationStub<KotlinPlaceHolde
@Override
public boolean hasBody() {
return true;
return getBodyExpression() != null;
}
@Override