KT-650 Prohibit creating class without constructor

This commit is contained in:
svtk
2012-01-24 15:41:38 +04:00
parent ee5fcccda9
commit 70d0cd882b
43 changed files with 170 additions and 218 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ open class C {
open fun f(): Any = "C f"
}
class D() : C {
class D() : C() {
override fun f(): String = "D f"
}
@@ -3,7 +3,7 @@ abstract open class Default {
}
class MyInt() {
class object : Default {
class object : Default() {
override fun defaultValue(): Int = 610
}
}
@@ -2,7 +2,7 @@ open class Foo {
fun xyzzy(): String = "xyzzy"
}
class Bar(): Foo {
class Bar(): Foo() {
fun test(): String = xyzzy()
}
@@ -6,7 +6,7 @@ trait ALE<T> : AL<T> {
fun getOrValue(index: Int, value : T) : T = get(index) ?: value
}
class SmartArrayList() : ALE<String>, AL<String> {
class SmartArrayList() : ALE<String>, AL<String>() {
}
fun box() : String {