generate pseudocode for property accessor only if the property is local

otherwise check it independently like a function
This commit is contained in:
Svetlana Isakova
2014-01-23 17:27:08 +04:00
parent 1c4db84d92
commit aa713ef1f6
9 changed files with 123 additions and 64 deletions
@@ -0,0 +1,38 @@
package d
val a: Int
get() {
val b: Int
val <!UNUSED_VARIABLE!>c<!>: Int
<!UNUSED_EXPRESSION!>42<!>
fun bar(): Int {
val d: Int
<!UNUSED_EXPRESSION!>42<!>
return <!UNINITIALIZED_VARIABLE!>d<!>
}
return <!UNINITIALIZED_VARIABLE!>b<!>
}
class A {
val a: Int
get() {
val b: Int
val <!UNUSED_VARIABLE!>c<!>: Int
<!UNUSED_EXPRESSION!>42<!>
return <!UNINITIALIZED_VARIABLE!>b<!>
}
fun foo() {
class B {
val a: Int
get() {
val b: Int
val <!UNUSED_VARIABLE!>c<!>: Int
<!UNUSED_EXPRESSION!>42<!>
return <!UNINITIALIZED_VARIABLE!>b<!>
}
}
}
}