backend/tests: add objectInitialization1
This commit is contained in:
@@ -149,6 +149,12 @@ task objectInitialization(type: RunKonanTest) {
|
|||||||
source = "codegen/object/initialization.kt"
|
source = "codegen/object/initialization.kt"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task objectInitialization1(type: RunKonanTest) {
|
||||||
|
disabled = true
|
||||||
|
goldValue = "init\nfield\nconstructor1\ninit\nfield\nconstructor1\nconstructor2\n"
|
||||||
|
source = "codegen/object/initialization1.kt"
|
||||||
|
}
|
||||||
|
|
||||||
task check_type(type: RunKonanTest) {
|
task check_type(type: RunKonanTest) {
|
||||||
goldValue = "true\nfalse\ntrue\ntrue\ntrue\ntrue\n"
|
goldValue = "true\nfalse\ntrue\ntrue\ntrue\ntrue\n"
|
||||||
source = "codegen/basics/check_type.kt"
|
source = "codegen/basics/check_type.kt"
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
class Test {
|
||||||
|
constructor() {
|
||||||
|
println("constructor1")
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(x: Int) : this() {
|
||||||
|
println("constructor2")
|
||||||
|
}
|
||||||
|
|
||||||
|
init {
|
||||||
|
println("init")
|
||||||
|
}
|
||||||
|
|
||||||
|
val f = println("field")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
Test()
|
||||||
|
Test(1)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user