UnnecessaryVariableInspection: don't report for overriding property

#KT-39263 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-06-09 23:31:03 +09:00
committed by Ilya Kirillov
parent c29dbee65e
commit 122bba9102
3 changed files with 24 additions and 0 deletions
@@ -0,0 +1,17 @@
// PROBLEM: none
abstract class Foo {
abstract val bar: Int
abstract fun baz()
}
fun println(i: Int) {}
fun test() {
val i = 1
object : Foo() {
override val <caret>bar = i
override fun baz() {
println(bar)
}
}
}