KT-4915 Smart completion should work for auto-casted 'this'
#KT-4915 Fixed
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
open class Foo{
|
||||
fun f() {
|
||||
if (this is Bar){
|
||||
var a : Bar = <caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Bar : Foo
|
||||
|
||||
|
||||
// EXIST: { itemText:"this" }
|
||||
@@ -0,0 +1,13 @@
|
||||
open class Foo{
|
||||
fun Any.f() {
|
||||
if (this@Foo is Bar && this is Bar){
|
||||
var a: Bar = <caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Bar : Foo
|
||||
|
||||
|
||||
// EXIST: { lookupString: "this" }
|
||||
// EXIST: { lookupString: "this@Foo" }
|
||||
@@ -0,0 +1,16 @@
|
||||
open class Foo{
|
||||
fun Bar.f() {
|
||||
fun Any.g() {
|
||||
if (this is Bar){
|
||||
var a: Bar = this@<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Bar : Foo
|
||||
|
||||
|
||||
// EXIST: { lookupString: "this@g" }
|
||||
// EXIST: { lookupString: "this@f" }
|
||||
// ABSENT: { lookupString: "this@Foo" }
|
||||
Reference in New Issue
Block a user