Introduce Parameter: Suggest removing extension receiver which becomes unused after new parameter is added
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_DEFAULT_VALUE: false
|
||||
class A(val n: Int) {
|
||||
fun foo(i: Int): Int {
|
||||
return i
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val a = A(1)
|
||||
a.foo(a.n + 1)
|
||||
with(A(1)) {
|
||||
foo(n + 1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user