Files
kotlin-fork/compiler/visualizer/testData/rawBuilder/declarations/contracts/newSyntax/simpleFunctionsContractDescription.kt
T

17 lines
579 B
Kotlin
Vendored

// FIR_IGNORE
// new contracts syntax for simple functions
// EQ operator call
// [ERROR : MyClass]? │ [ERROR: unknown type] [ERROR: unknown type]
// │ │ │ │
fun test1(s: MyClass?) contract [returns() implies (s != null), returns() implies (s is MySubClass)] {
// [ERROR: not resolved]
// │
test_1()
}
fun test2() contract [returnsNotNull()] {
// fun test2(): Unit
// │
test2()
}