mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
22 lines
552 B
Plaintext
22 lines
552 B
Plaintext
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) */
|
|
} |