Files
kotlin-fork/compiler/tests-spec/testData/codegen/box/templates/identifiers/variableDeclarationEntry.kt
T
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00

33 lines
745 B
Kotlin
Vendored

<!DIRECTIVES("WITH_STDLIB")!>
val <!ELEMENT(1)!> = {`false`: Boolean -> !`false` }
fun f1(value: Pair<String, String>): Boolean {
val (<!ELEMENT(2)!>, <!ELEMENT(3)!>) = value
if (<!ELEMENT(2)!> != "1") return false
if (<!ELEMENT(3)!> != "2") return false
return true
}
fun box(): String? {
var i = 0
for (<!ELEMENT(4)!>: Int in 0..10) {
i++
}
if (!<!ELEMENT(1)!>(false)) return null
val <!ELEMENT(5)!> = { <!ELEMENT(6)!>: Boolean, <!ELEMENT(7)!>: Int -> true }
var <!ELEMENT(8)!>: Boolean
<!ELEMENT(8)!> = false
if (!f1(Pair("1", "2"))) return null
if (i != 11) return null
if (!<!ELEMENT(5)!>(false, 10)) return null
if (<!ELEMENT(8)!>) return null
return "OK"
}