Do not include overriders when analyzing parameter usages unless invoked on parameter

This commit is contained in:
Valentin Kipyatkov
2020-02-10 08:02:14 +02:00
parent e76eaa4b5b
commit ff516cac73
12 changed files with 118 additions and 6 deletions
+28
View File
@@ -0,0 +1,28 @@
// FLOW: IN
open class C {
var other: C? = null
fun foo(p: Int) {
println(p + 1)
other?.bar(p + 1)
}
fun bar(<caret>p: Int) {
println(p + 2)
}
}
class D : C() {
var other: D? = null
override fun foo(p: Int) {
println(p + 3)
other?.bar(p + 3)
}
override fun bar(p: Int) {
println(p + 4)
}
}