Getting default value from overriding method
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
// "Replace with 'newFun(p1, p2, p3)'" "true"
|
||||
|
||||
interface I {
|
||||
@deprecated("", ReplaceWith("newFun(p1, p2, p3)"))
|
||||
fun oldFun(p1: String, p2: Int = 0, p3: Int = 1)
|
||||
|
||||
fun newFun(p1: String, p2: Int = 1, p3: Int = 1)
|
||||
}
|
||||
|
||||
abstract class C : I {
|
||||
override fun newFun(p1: String, p2: Int, p3: Int) { }
|
||||
|
||||
}
|
||||
|
||||
fun foo(c: C) {
|
||||
c.<caret>newFun("", 0)
|
||||
}
|
||||
Reference in New Issue
Block a user