Kotlin: handle default parameter values inherited from an overridden function

This commit is contained in:
Chris Smowton
2022-11-01 12:11:02 +00:00
parent 37869e816b
commit d700fddfdd
4 changed files with 38 additions and 7 deletions

View File

@@ -0,0 +1,2 @@
| test.kt:3:8:3:28 | f(...) | test.kt:3:8:3:28 | f | test.kt:1:1:5:1 | A |
| test.kt:11:21:11:23 | f$default(...) | test.kt:3:8:3:28 | f$default | test.kt:1:1:5:1 | A |

View File

@@ -0,0 +1,13 @@
open class A {
open fun f(x: Int = 0) = x
}
class B : A() {
override fun f(x: Int) = x + 1
fun user() = this.f()
}

View File

@@ -0,0 +1,4 @@
import java
from MethodAccess ma
select ma, ma.getCallee(), ma.getCallee().getDeclaringType()