added 'mergeDataWithLocalDeclarations' option
for collecting variable data for pseudocode removed using data from outer context for local declarations for 'variable initializers' analysis
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
package o
|
||||
|
||||
class TestFunctionLiteral {
|
||||
val sum: (Int) -> Int = { (x: Int) ->
|
||||
sum(x - 1) + x
|
||||
}
|
||||
val foo: () -> Unit = @l ({ foo() })
|
||||
}
|
||||
|
||||
open class A(val a: A)
|
||||
|
||||
class TestObjectLiteral {
|
||||
val obj: A = object: A(<!UNINITIALIZED_VARIABLE!>obj<!>) {
|
||||
{
|
||||
val x = <!UNINITIALIZED_VARIABLE!>obj<!>
|
||||
}
|
||||
fun foo() {
|
||||
val y = obj
|
||||
}
|
||||
}
|
||||
val obj1: A = @l ( object: A(<!UNINITIALIZED_VARIABLE!>obj1<!>) {
|
||||
{
|
||||
val x = <!UNINITIALIZED_VARIABLE!>obj1<!>
|
||||
}
|
||||
fun foo() = obj1
|
||||
})
|
||||
}
|
||||
|
||||
class TestOther {
|
||||
val x: Int = <!UNINITIALIZED_VARIABLE!>x<!> + 1
|
||||
}
|
||||
Reference in New Issue
Block a user