Prohibit constructors declarations for object

This commit is contained in:
Denis Zharkov
2015-02-13 14:55:44 +03:00
parent 3fef4ad742
commit 28fbdb7c53
9 changed files with 103 additions and 3 deletions
@@ -0,0 +1,20 @@
object A {
<!SECONDARY_CONSTRUCTOR_IN_OBJECT!>constructor() {}<!>
init {}
}
enum class B {
X : B() {
<!SECONDARY_CONSTRUCTOR_IN_OBJECT!>constructor() {}<!>
}
}
class C {
default object {
<!SECONDARY_CONSTRUCTOR_IN_OBJECT!>constructor() {}<!>
}
}
val anonObject = object {
<!SECONDARY_CONSTRUCTOR_IN_OBJECT!>constructor() {}<!>
}