63b13027df
Except all, it's also useful to use one class of language version settings for compiler tests to configure it specially for tests
15 lines
299 B
Kotlin
Vendored
15 lines
299 B
Kotlin
Vendored
// !LANGUAGE: +CallsInPlaceEffect
|
|
|
|
import kotlin.internal.contracts.*
|
|
|
|
inline fun myRun(block: () -> Unit): Unit {
|
|
contract {
|
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
|
}
|
|
block()
|
|
}
|
|
|
|
fun test() {
|
|
myRun { throw java.lang.IllegalArgumentException() }
|
|
val x: Int = 42
|
|
} |