Minor, remove obsolete directives and suppressions from contracts test data
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseCallsInPlaceEffect +ReadDeserializedContracts
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
@ExperimentalContracts
|
||||
fun runOnce(action: () -> Unit) {
|
||||
contract {
|
||||
callsInPlace(action, InvocationKind.EXACTLY_ONCE)
|
||||
@@ -12,7 +10,6 @@ fun runOnce(action: () -> Unit) {
|
||||
action()
|
||||
}
|
||||
|
||||
@ExperimentalContracts
|
||||
class Foo(foo: Boolean) {
|
||||
var res = "FAIL"
|
||||
init {
|
||||
@@ -23,8 +20,7 @@ class Foo(foo: Boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
@ExperimentalContracts
|
||||
fun box(): String {
|
||||
val foo = Foo(true)
|
||||
return foo.res
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseCallsInPlaceEffect +ReadDeserializedContracts
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun myrun(block: () -> Unit) {
|
||||
contract {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
|
||||
Reference in New Issue
Block a user