Control-Flow Analysis: Reuse pseudo-value information for unused expression analysis
This commit is contained in:
@@ -6,5 +6,5 @@ fun Any.equals(other : Any?) : Boolean = this === other
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val command = parse("")
|
||||
if (command == null) 1 // error on this line, but must be OK
|
||||
}
|
||||
if (command == null) <!UNUSED_EXPRESSION!>1<!> // error on this line, but must be OK
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
fun <T> T.mustBe(t : T) {
|
||||
<!UNUSED_EXPRESSION!>"$this must be$<!SYNTAX!>as<!>$t"<!>
|
||||
}
|
||||
"$this must be$<!SYNTAX!>as<!>$t"
|
||||
}
|
||||
Reference in New Issue
Block a user