Parsing: allow primary ctor in object syntactically

It's needed for better recovering for cases of changes like 'class' -> 'object'

The only sensible case when it's may be bad:
class A {
   object B
   constructor() : super()
}

But it seems to be rare, and ';' can be used to separate object from secondary ctor
This commit is contained in:
Denis Zharkov
2015-05-29 18:38:01 +03:00
parent 3f7ca5a586
commit 9c574469ca
6 changed files with 57 additions and 70 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ private @open [Ann1(1)] @Ann2("1") Ann3("2") class A(
@companion object
@companion @private object B
@companion @private object B;
@main