Completion: no qualified this for anonymous object + no keyword escaping for qualified this

This commit is contained in:
Valentin Kipyatkov
2014-08-27 20:35:42 +04:00
parent 5799ecbd28
commit d64f930ff1
8 changed files with 65 additions and 21 deletions
@@ -0,0 +1,8 @@
class `this` {
fun String.foo(){
val foo: `this` = <caret>
}
}
// ELEMENT: "this@this"
@@ -0,0 +1,8 @@
class `this` {
fun String.foo(){
val foo: `this` = this@this<caret>
}
}
// ELEMENT: "this@this"
@@ -0,0 +1,12 @@
fun `fun`(handler: String.() -> Unit){}
fun bar(handler: Int.() -> Unit){}
fun foo(){
`fun`({
bar({
val s: String = <caret>
})
})
}
// ELEMENT: this@fun
@@ -0,0 +1,12 @@
fun `fun`(handler: String.() -> Unit){}
fun bar(handler: Int.() -> Unit){}
fun foo(){
`fun`({
bar({
val s: String = this@fun<caret>
})
})
}
// ELEMENT: this@fun
@@ -12,4 +12,4 @@ fun bar() {
})
}
// EXIST: this@foo
// ABSENT: this@foo