Control-Flow Analysis: Reuse pseudo-value information for unused expression analysis
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
// FILE: f.kt
|
||||
class A() {
|
||||
fun foo() : Unit {
|
||||
this@A
|
||||
<!UNUSED_EXPRESSION!>this@A<!>
|
||||
this<!UNRESOLVED_REFERENCE!>@a<!>
|
||||
this
|
||||
<!UNUSED_EXPRESSION!>this<!>
|
||||
}
|
||||
|
||||
val x = this@A.foo()
|
||||
|
||||
@@ -5,7 +5,7 @@ fun notAnExpression() {
|
||||
if (<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>) {} else {} // not an expression
|
||||
val <!UNUSED_VARIABLE!>x<!> = <!SUPER_IS_NOT_AN_EXPRESSION!>super<!> // not an expression
|
||||
when (1) {
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!> -> 1 // not an expression
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!> -> <!UNUSED_EXPRESSION!>1<!> // not an expression
|
||||
else -> {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user