Smart completion: this expressions added
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class Foo{
|
||||
fun String.foo(){
|
||||
val foo : Foo = <caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { lookupString:"this@Foo", typeText:"Foo" }
|
||||
@@ -0,0 +1,15 @@
|
||||
open class Foo
|
||||
|
||||
fun foo(f: Foo){}
|
||||
|
||||
fun bar() {
|
||||
foo(object: Foo() {
|
||||
inner class Inner {
|
||||
fun f() {
|
||||
val x: Foo = <caret>
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// EXIST: this@foo
|
||||
@@ -0,0 +1,9 @@
|
||||
class Foo{
|
||||
fun String.foo(){
|
||||
fun Foo.bar(){
|
||||
val s: String = <caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { lookupString:"this@foo", typeText:"jet.String" }
|
||||
@@ -0,0 +1,12 @@
|
||||
fun accept1(handler: String.() -> Unit){}
|
||||
fun accept2(handler: Int.() -> Unit){}
|
||||
|
||||
fun foo(){
|
||||
accept1({
|
||||
accept2({
|
||||
val s: String = <caret>
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// EXIST: this@accept1
|
||||
@@ -0,0 +1,14 @@
|
||||
object X {
|
||||
fun accept1(handler: String.() -> Unit){}
|
||||
fun accept2(handler: Int.() -> Unit){}
|
||||
}
|
||||
|
||||
fun foo(){
|
||||
X.accept1({
|
||||
X.accept2({
|
||||
val s: String = <caret>
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// EXIST: this@accept1
|
||||
@@ -0,0 +1,12 @@
|
||||
fun<T> accept1(handler: String.(t: T) -> Unit){}
|
||||
fun accept2(handler: Int.() -> Unit){}
|
||||
|
||||
fun foo(){
|
||||
accept1<String>({
|
||||
accept2({
|
||||
val s: String = <caret>
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// EXIST: this@accept1
|
||||
@@ -0,0 +1,5 @@
|
||||
fun String.foo(){
|
||||
val s : String = <caret>
|
||||
}
|
||||
|
||||
// EXIST: { lookupString:"this", typeText:"jet.String" }
|
||||
@@ -1,5 +0,0 @@
|
||||
fun String.foo(){
|
||||
val s : String = <caret>
|
||||
}
|
||||
|
||||
// EXIST: this
|
||||
Reference in New Issue
Block a user