5ab79a111d
This is needed for further commit, which supports contracts-based smartcasts in partial body resolve mode. NB: Stubs can be built from 3 sources: - source code (contract presence can be checked by PSI) - binary data (contract presence can be checked by Kotlin Metadata) - decompiled sources The last case is a bit of a headache, because usually bodies are omitted in decompiled sources. To workaround it, we have to inject stubbed contract-call in the body.
10 lines
163 B
Kotlin
Vendored
10 lines
163 B
Kotlin
Vendored
@file:Suppress("INVISIBLE_MEMBER")
|
|
package test
|
|
|
|
import kotlin.internal.contracts.*
|
|
|
|
fun myRequire(x: Boolean) {
|
|
contract {
|
|
returns() implies x
|
|
}
|
|
} |