[FIR] Disable data flow from in-place lambdas
There are many complications with the current design of passing data from within in-place lambdas to surrounding code. Solving these complications will involve more time to investigation than is available within the K2 release. So we are disabling passing type statement information from lambdas for the time being until more time can be devoted to a more complete solution. ^KT-60958 Fixed ^KT-63530 Fixed
This commit is contained in:
Vendored
-39
@@ -1,39 +0,0 @@
|
||||
// !OPT_IN: kotlin.contracts.ExperimentalContracts
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: contracts, analysis, smartcasts
|
||||
* NUMBER: 12
|
||||
* DESCRIPTION: Smartcasts after non-null assertions or not-null value assignment in lambdas of contract function with 'exactly once' or 'at least once' CallsInPlace effects.
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-26148
|
||||
* HELPERS: contractFunctions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(arg: Int?) {
|
||||
funWithExactlyOnceCallsInPlace { arg!! }
|
||||
arg.inc()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(arg: Int?) {
|
||||
funWithAtLeastOnceCallsInPlace { arg!! }
|
||||
arg.inc()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
val value_1: Boolean?
|
||||
funWithExactlyOnceCallsInPlace { value_1 = false }
|
||||
value_1.not()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4() {
|
||||
val value_1: Boolean?
|
||||
funWithAtLeastOnceCallsInPlace { <!VAL_REASSIGNMENT!>value_1<!> = true }
|
||||
value_1.not()
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !OPT_IN: kotlin.contracts.ExperimentalContracts
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user