Do not include overriders when analyzing parameter usages unless invoked on parameter
This commit is contained in:
+28
@@ -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(p: Int) {
|
||||
println(<caret>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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
8 other?.bar(<bold>p + 1</bold>)
|
||||
12 println(<bold>p</bold> + 2)
|
||||
11 fun bar(<bold>p: Int</bold>) {
|
||||
8 other?.bar(<bold>p + 1</bold>)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
[NotNull Values]
|
||||
12 println(<bold>p</bold> + 2)
|
||||
12 println(<bold>p</bold> + 2)
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
12 println(<bold>p</bold> + 2)
|
||||
11 fun bar(<bold>p: Int</bold>) {
|
||||
8 other?.bar(<bold>p + 1</bold>)
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
8 other?.bar(<bold>p + 1</bold>)
|
||||
11 fun bar(<bold>p: Int</bold>) {
|
||||
8 other?.bar(<bold>p + 1</bold>)
|
||||
|
||||
21 other?.bar(<bold>p + 3</bold>)
|
||||
11 fun bar(<bold>p: Int</bold>) {
|
||||
21 other?.bar(<bold>p + 3</bold>)
|
||||
@@ -0,0 +1,3 @@
|
||||
[NotNull Values]
|
||||
11 fun bar(<bold>p: Int</bold>) {
|
||||
11 fun bar(<bold>p: Int</bold>) {
|
||||
@@ -0,0 +1,3 @@
|
||||
11 fun bar(<bold>p: Int</bold>) {
|
||||
8 other?.bar(<bold>p + 1</bold>)
|
||||
21 other?.bar(<bold>p + 3</bold>)
|
||||
Reference in New Issue
Block a user