[FIR] Add CFG nodes, add multiple subGraphs for CFGOwner
This commit is contained in:
+46
@@ -0,0 +1,46 @@
|
||||
fun test1() {
|
||||
val x: Int
|
||||
|
||||
fun func() {
|
||||
x = 0
|
||||
}
|
||||
|
||||
println(<!UNINITIALIZED_VARIABLE!>x<!>)
|
||||
}
|
||||
|
||||
|
||||
fun test2() {
|
||||
val x: Int
|
||||
val y: Int
|
||||
|
||||
object {
|
||||
init {
|
||||
x = 0
|
||||
}
|
||||
|
||||
fun localFunc() {
|
||||
y = 0
|
||||
}
|
||||
}
|
||||
|
||||
println(<!UNINITIALIZED_VARIABLE!>x<!>)
|
||||
println(<!UNINITIALIZED_VARIABLE!>x<!>)
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
val x: Int
|
||||
val y: Int
|
||||
|
||||
class A {
|
||||
init {
|
||||
x = 0
|
||||
}
|
||||
|
||||
fun localFunc() {
|
||||
y = 0
|
||||
}
|
||||
}
|
||||
|
||||
println(<!UNINITIALIZED_VARIABLE!>x<!>)
|
||||
println(<!UNINITIALIZED_VARIABLE!>x<!>)
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
FILE: fromLocalMembers.kt
|
||||
public final fun test1(): R|kotlin/Unit| {
|
||||
lval x: R|kotlin/Int|
|
||||
local final fun func(): R|kotlin/Unit| {
|
||||
R|<local>/x| = Int(0)
|
||||
}
|
||||
|
||||
R|kotlin/io/println|(R|<local>/x|)
|
||||
}
|
||||
public final fun test2(): R|kotlin/Unit| {
|
||||
lval x: R|kotlin/Int|
|
||||
lval y: R|kotlin/Int|
|
||||
object : R|kotlin/Any| {
|
||||
private[local] constructor(): R|<anonymous>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
init {
|
||||
R|<local>/x| = Int(0)
|
||||
}
|
||||
|
||||
public[local] final fun localFunc(): R|kotlin/Unit| {
|
||||
R|<local>/y| = Int(0)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
R|kotlin/io/println|(R|<local>/x|)
|
||||
R|kotlin/io/println|(R|<local>/x|)
|
||||
}
|
||||
public final fun test3(): R|kotlin/Unit| {
|
||||
lval x: R|kotlin/Int|
|
||||
lval y: R|kotlin/Int|
|
||||
local final class A : R|kotlin/Any| {
|
||||
public[local] constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
init {
|
||||
R|<local>/x| = Int(0)
|
||||
}
|
||||
|
||||
public[local] final fun localFunc(): R|kotlin/Unit| {
|
||||
R|<local>/y| = Int(0)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
R|kotlin/io/println|(R|<local>/x|)
|
||||
R|kotlin/io/println|(R|<local>/x|)
|
||||
}
|
||||
Reference in New Issue
Block a user