[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun test(x: Any?) {
|
||||
if (isString(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun isString(x: Any?): Boolean {
|
||||
contract {
|
||||
returns(true) implies (x is String)
|
||||
}
|
||||
return x is String
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user