Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
This commit is contained in:
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun Any.nullWhenString(): Any? {
|
||||
contract {
|
||||
returns(null) implies (this@nullWhenString is String)
|
||||
}
|
||||
return if (this is String) null else this
|
||||
}
|
||||
|
||||
fun test(x: Int?) {
|
||||
if (x?.nullWhenString() == null) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user