Data flow values: initializers for local variables are now stored as "bound values" with inherited nullability #KT-6840 Fixed
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
fun foo(arg: Int?) {
|
||||
val x = arg
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_SMARTCAST!>arg<!>.hashCode()
|
||||
}
|
||||
val y: Any? = arg
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_SMARTCAST!>arg<!>.hashCode()
|
||||
}
|
||||
val yy: Any?
|
||||
yy = arg
|
||||
if (yy != null) {
|
||||
arg<!UNSAFE_CALL!>.<!>hashCode()
|
||||
}
|
||||
var z = arg
|
||||
z = z?.let { 42 }
|
||||
if (z != null) {
|
||||
arg<!UNSAFE_CALL!>.<!>hashCode()
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ arg: kotlin.Int?): kotlin.Unit
|
||||
Reference in New Issue
Block a user