Files
kotlin-fork/compiler/tests-spec/testData/codegen/box/templates/identifiers/valueArgument.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

18 lines
604 B
Kotlin
Vendored

<!DIRECTIVES("WITH_STDLIB")!>
fun f1(<!ELEMENT(1)!>: Boolean, <!ELEMENT(2)!>: Boolean) = <!ELEMENT(1)!> && !!!<!ELEMENT(2)!>
fun f2(<!ELEMENT(3)!>: Boolean): Boolean {
return !<!ELEMENT(3)!>
}
fun f3(vararg <!ELEMENT(4)!>: Boolean, <!ELEMENT(5)!>: Boolean) = <!ELEMENT(4)!>.any { it } && <!ELEMENT(5)!>
fun box(): String? {
if (f1(<!ELEMENT(1)!> = false, <!ELEMENT(2)!> = true)) return null
if (!f2(<!ELEMENT(3)!> = false && true || true && false)) return null
if (!f3(<!ELEMENT(4)!> = *booleanArrayOf(true, false, false, true), <!ELEMENT(5)!> = true)) return null
return "OK"
}