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:
Svetlana Isakova
2014-03-05 19:42:05 +04:00
parent eed3dec539
commit fbbfb95861
19 changed files with 332 additions and 103 deletions
@@ -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
}