Files
kotlin-fork/kotlin-native/backend.native/tests/coverage/basic/smoke1/smoke1.kt
T
Stanislav Erokhin f624800b84 Move everything under kotlin-native folder
I was forced to manually do update the following files, because otherwise
they would be ignored according .gitignore settings. Probably they
should be deleted from repo.

Interop/.idea/compiler.xml
Interop/.idea/gradle.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml
Interop/.idea/modules.xml
Interop/.idea/modules/Indexer/Indexer.iml
Interop/.idea/modules/Runtime/Runtime.iml
Interop/.idea/modules/StubGenerator/StubGenerator.iml
backend.native/backend.native.iml
backend.native/bc.frontend/bc.frontend.iml
backend.native/cli.bc/cli.bc.iml
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt
backend.native/tests/link/lib/foo.kt
backend.native/tests/link/lib/foo2.kt
backend.native/tests/teamcity-test.property
2020-10-27 21:00:28 +03:00

49 lines
766 B
Kotlin

package coverage.basic.smoke1
class A(val prop: Int) {
constructor() : this(1)
fun action1() {
println(prop)
}
fun action2() {
}
}
class B private constructor(val prop: String) {
init {
println("init block")
}
constructor(prop1: String, prop2: String) : this("$prop1, $prop2")
constructor() : this("dummy") {
if (1 > 2) {
println("uncovered")
} else {
println("foo")
}
println("bar")
}
override fun toString() = prop
}
fun main(args: Array<String>) {
val a1 = A(2)
a1.action1()
a1.action2()
val a2 = A()
a2.action1()
a2.action1()
val b1 = B("Hello", "world")
val b2 = B()
println(b1)
println(b2)
}