"Go to Type Declaration" for extension receiver and 'it' (KT-13013)

#KT-13013 Fixed
This commit is contained in:
Nikolay Krasko
2017-03-17 15:09:28 +03:00
parent daaa59a1ad
commit e599688733
13 changed files with 276 additions and 13 deletions
@@ -0,0 +1,12 @@
// FILE: before.kt
interface Foo1
interface Bar1
fun Foo1.<caret>test(): Bar1 = null!!
// FILE: after.kt
interface Foo1
interface <caret>Bar1
fun Foo1.test(): Bar1 = null!!
@@ -0,0 +1,12 @@
// FILE: before.kt
interface Foo1
interface Bar1
fun Foo1.test(): <caret>Bar1 = null!!
// FILE: after.kt
interface Foo1
interface Bar1
fun Foo1.test(): <caret>Bar1 = null!!
@@ -0,0 +1,12 @@
// FILE: before.kt
interface Foo1
interface Bar1
fun <caret>Foo1.test(): Bar1 = null!!
// FILE: after.kt
interface Foo1
interface Bar1
fun <caret>Foo1.test(): Bar1 = null!!
@@ -0,0 +1,23 @@
// FILE: before.kt
interface Foo
interface Bar
fun foo(a: Foo.(Bar) -> Unit) {}
fun bar() {
foo {
<caret>it
}
}
// FILE: after.kt
interface Foo
interface <caret>Bar
fun foo(a: Foo.(Bar) -> Unit) {}
fun bar() {
foo {
it
}
}
@@ -0,0 +1,23 @@
// FILE: before.kt
class Foo
fun <T> some(a: T, f: (T) -> Unit) {}
fun foo(a: Any) {}
fun baz() {
some(Foo()) {
foo(it<caret>)
}
}
// FILE: after.kt
class <caret>Foo
fun <T> some(a: T, f: (T) -> Unit) {}
fun foo(a: Any) {}
fun baz() {
some(Foo()) {
foo(it)
}
}
@@ -0,0 +1,9 @@
// FILE: before.kt
class Foo
val f: () -> Foo = {<caret> }
// FILE: after.kt
class Foo
val f: () -> Foo = {<caret> }
@@ -0,0 +1,18 @@
// FILE: before.kt
interface Foo
fun foo(a: Any) {}
fun Foo.bar() {
foo(this<caret>)
}
// FILE: after.kt
interface <caret>Foo
fun foo(a: Any) {}
fun Foo.bar() {
foo(this)
}
@@ -0,0 +1,15 @@
// FILE: before.kt
interface Foo
@Target(AnnotationTarget.TYPE)
annotation class A
fun @A Foo.bar(): Any = <caret>this
// FILE: after.kt
interface <caret>Foo
@Target(AnnotationTarget.TYPE)
annotation class A
fun @A Foo.bar(): Any = this
@@ -0,0 +1,9 @@
// FILE: before.kt
interface Foo<T, U>
fun Foo<Int, String>.bar(): Any = <caret>this
// FILE: after.kt
interface <caret>Foo<T, U>
fun Foo<Int, String>.bar(): Any = this
@@ -0,0 +1,21 @@
// FILE: before.kt
interface Foo
fun foo(a: Foo.() -> Unit) {}
fun bar() {
foo {
<caret>this
}
}
// FILE: after.kt
interface <caret>Foo
fun foo(a: Foo.() -> Unit) {}
fun bar() {
foo {
this
}
}
@@ -0,0 +1,19 @@
// FILE: before.kt
interface Foo
interface Bar
val Foo.test: Bar
get() {
<caret>this
return null!!
}
// FILE: after.kt
interface <caret>Foo
interface Bar
val Foo.test: Bar
get() {
this
return null!!
}