22 lines
552 B
Plaintext
Vendored
22 lines
552 B
Plaintext
Vendored
Resolve target: value-parameter x: kotlin.Any? smart-cast to kotlin.String
|
|
----------------------------------------------
|
|
// COMPILER_ARGUMENTS: -XXLanguage:+AllowContractsForCustomFunctions -XXLanguage:+UseReturnsEffect
|
|
package test
|
|
|
|
import kotlin.contracts.*
|
|
|
|
@OptIn(ExperimentalContracts::class)
|
|
fun myRequire(x: Boolean) {
|
|
contract {
|
|
returns() implies x
|
|
}
|
|
}
|
|
|
|
fun testContractFromSource(x: Any?, y: Any?) {
|
|
myRequire(x is String)
|
|
myRequire(y is String)
|
|
|
|
<caret>x.length
|
|
|
|
/* STATEMENT DELETED: myRequire(x is Int) */
|
|
} |