Bug fix: jump out of a loop inside if condition
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
fun checkJump(x: Int?, y: Int?) {
|
||||
while (true) {
|
||||
if (x ?: break == 0) {
|
||||
y!!
|
||||
} else {
|
||||
y!!
|
||||
}
|
||||
// Ok
|
||||
<!DEBUG_INFO_SMARTCAST!>y<!>.hashCode()
|
||||
}
|
||||
// Smart cast here is erroneous: y is nullable
|
||||
y<!UNSAFE_CALL!>.<!>hashCode()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun checkJump(/*0*/ x: kotlin.Int?, /*1*/ y: kotlin.Int?): kotlin.Unit
|
||||
Reference in New Issue
Block a user