FIR IDE: add KtExtensionReceiverSymbol

This symbol represents the extension receiver of a callable and
currently is used as the resolution target of `this` in a callable with
extension.
This commit is contained in:
Tianyu Geng
2021-09-22 15:38:13 -07:00
committed by Space
parent d3c91ee9be
commit e195f0426e
17 changed files with 161 additions and 13 deletions
@@ -0,0 +1,2 @@
Resolved to:
0: extension receiver of fun kotlin.String.foo()
@@ -0,0 +1,5 @@
class Foo {
fun String.foo() {
this@f<caret>oo
}
}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Foo) fun kotlin.String.foo()
@@ -0,0 +1,5 @@
class Foo {
fun String.foo() {
t<caret>his@foo
}
}
@@ -0,0 +1,2 @@
Resolved to:
0: extension receiver of fun kotlin.String.foo()
@@ -0,0 +1,6 @@
class Foo {
val String.foo : Any
get() {
this@f<caret>oo
}
}
@@ -0,0 +1,2 @@
Resolved to:
0: (in Foo) val kotlin.String.foo: kotlin.Any
@@ -0,0 +1,6 @@
class Foo {
val String.foo : Any
get() {
t<caret>his@foo
}
}
@@ -0,0 +1,2 @@
Resolved to:
0: extension receiver of val kotlin.String.foo: kotlin.Any