x?.y is now nullable even if y is Unit + three tests + codegen test fix + source code fix #KT-7936 Fixed #KT-8347 Fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
fun foo(x: Int?) {
|
||||
// Both parts of the Elvis should be alive, see KT-7936
|
||||
x?.let {
|
||||
smth()
|
||||
}?: orElse()
|
||||
}
|
||||
|
||||
fun smth() {}
|
||||
fun orElse() {}
|
||||
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
internal fun foo(/*0*/ x: kotlin.Int?): kotlin.Unit
|
||||
internal fun orElse(): kotlin.Unit
|
||||
internal fun smth(): kotlin.Unit
|
||||
Reference in New Issue
Block a user