mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
- Add ContractDescriptorRenderer - Add option to dump function contracts in DescriptorRendererOptions - Add parsing of LANGUAGE_VERSION directive in AbstractLoadJava - Add tests on serialization-deserializaton identity of contracts ========== Introduction of EffectSystem: 13/18
21 lines
353 B
Kotlin
Vendored
21 lines
353 B
Kotlin
Vendored
// LANGUAGE_VERSION: 1.3
|
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
|
|
|
package test
|
|
|
|
import kotlin.internal.contracts.*
|
|
|
|
class A
|
|
|
|
fun simpleIsInstace(x: Any?) {
|
|
contract {
|
|
returns(true) implies (x is A)
|
|
}
|
|
}
|
|
|
|
fun Any?.receiverIsInstance() {
|
|
contract {
|
|
returns(true) implies (this@receiverIsInstance is A)
|
|
}
|
|
}
|