Files
kotlin/compiler/testData/codegen/box/extensionFunctions/shared.kt
2019-11-19 11:00:09 +03:00

15 lines
300 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
infix fun <T> T.mustBe(t : T) {
assert("$this must be $t") {this == t}
}
inline fun assert(message : String, condition : () -> Boolean) {
if (!condition())
throw AssertionError(message)
}
fun box() : String {
"lala" mustBe "lala"
return "OK"
}