Only private constructors for sealed / enum classes #KT-12377 Fixed

Also #KT-8497 Fixed
This commit is contained in:
Mikhail Glukhikh
2016-05-18 17:02:50 +03:00
parent cffdce908e
commit 1a8181bdc4
14 changed files with 132 additions and 27 deletions
@@ -20,3 +20,13 @@ class E : D() {
public override fun willBecomePublic() {
}
}
enum class F private constructor(val x: Int) {
FIRST(42)
}
sealed class G constructor(val y: Int) {
private constructor(): this(42)
object H : G()
}