Minor, remove obsolete directives and suppressions from contracts test data
This commit is contained in:
+3
-13
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseCallsInPlaceEffect +ReadDeserializedContracts
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
@@ -12,36 +11,27 @@ interface SomeOutputScreenCallbacks {
|
||||
fun ontest()
|
||||
}
|
||||
|
||||
@ExperimentalContracts
|
||||
class OutputWorkScreenView(callbacks: SomeOutputScreenCallbacks) {
|
||||
val root = vBox {
|
||||
button(callbacks::ontest)
|
||||
}
|
||||
}
|
||||
|
||||
@ExperimentalContracts
|
||||
inline fun vBox(
|
||||
crossinline action: () -> Unit
|
||||
) {
|
||||
inline fun vBox(crossinline action: () -> Unit) {
|
||||
contract {
|
||||
callsInPlace(action, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return { action() }()
|
||||
}
|
||||
|
||||
@ExperimentalContracts
|
||||
inline fun button(
|
||||
onAction: () -> Unit
|
||||
) {
|
||||
inline fun button(onAction: () -> Unit) {
|
||||
onAction()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
import kotlin.contracts.*
|
||||
|
||||
@ExperimentalContracts
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
OutputWorkScreenView(object : SomeOutputScreenCallbacks {
|
||||
@@ -50,4 +40,4 @@ fun box(): String {
|
||||
}
|
||||
})
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user