Shorten References: Support 'this' simplification
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun foo(n: Int): Int = <selection>this.n + 1</selection>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun foo(n: Int): Int = this.n + 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun A.foo(): Int = <selection>this@A.n + n + 1</selection>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun A.foo(): Int = this@A.n + n + 1
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A(val n: Int) {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(): Int = <selection>this.n + 1</selection>
|
||||
@@ -0,0 +1,5 @@
|
||||
class A(val n: Int) {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(): Int = n + 1
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun foo(): Int = <selection>this.n + 1</selection>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun foo(): Int = n + 1
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
fun test(b: B) {
|
||||
<selection>this.b()</selection>
|
||||
}
|
||||
}
|
||||
|
||||
class B() {
|
||||
fun A.invoke() {}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
fun test(b: B) {
|
||||
b()
|
||||
}
|
||||
}
|
||||
|
||||
class B() {
|
||||
fun A.invoke() {}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun foo(n: Int): Int = <selection>this@A.n + 1</selection>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun foo(n: Int): Int = this.n + 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun foo(): Int = <selection>this@A.n + 1</selection>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val n: Int) {
|
||||
fun foo(): Int = n + 1
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
fun foo(n: Int) {
|
||||
|
||||
}
|
||||
|
||||
class A(val n: Int) {
|
||||
fun test() {
|
||||
<selection>test.foo(this@A)</selection>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
fun foo(n: Int) {
|
||||
|
||||
}
|
||||
|
||||
class A(val n: Int) {
|
||||
fun test() {
|
||||
foo(this)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user