FIR checker: reproduce KT-42348
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
be84110ada
commit
a154cf4c45
+16
@@ -0,0 +1,16 @@
|
||||
fun foo(arg: Boolean) {
|
||||
val x : Int
|
||||
if (arg) {
|
||||
x = 4
|
||||
} else {
|
||||
x = 2
|
||||
}
|
||||
|
||||
x.hashCode()
|
||||
|
||||
class Local {
|
||||
fun bar() {
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.hashCode()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fun foo(arg: Boolean) {
|
||||
val x : Int
|
||||
if (arg) {
|
||||
x = 4
|
||||
} else {
|
||||
x = 2
|
||||
}
|
||||
|
||||
x.hashCode()
|
||||
|
||||
class Local {
|
||||
fun bar() {
|
||||
x.hashCode()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ arg: kotlin.Boolean): kotlin.Unit
|
||||
Reference in New Issue
Block a user