Introduce Parameter: Suggest removing extension receiver which becomes unused after new parameter is added

This commit is contained in:
Alexey Sedunov
2015-06-17 16:05:50 +03:00
parent 5409b19abc
commit 378c1744cb
12 changed files with 168 additions and 34 deletions
@@ -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)
}
}