AA: fix KtTypeProvider#getReceiverTypeForDoubleColonExpression

K1 version has used a wrong expression to retrieve the slice.
K2 version mishandled property access as a receiver.

^KT-63195 fixed
This commit is contained in:
Jinseong Jeon
2023-11-05 23:27:28 -08:00
committed by Space Team
parent 26bac388e8
commit 4110a9971a
21 changed files with 479 additions and 6 deletions
@@ -0,0 +1 @@
fun test() = Int:<caret>:class
@@ -0,0 +1,2 @@
expression: Int::class
receiver:: type: kotlin.Int
@@ -0,0 +1,3 @@
interface MyInterface
fun test() = MyInterface:<caret>:class
@@ -0,0 +1,2 @@
expression: MyInterface::class
receiver:: type: MyInterface
@@ -0,0 +1,3 @@
interface MyInterface
fun test(x: MyInterface) = x:<caret>:class
@@ -0,0 +1,2 @@
expression: x::class
receiver:: type: MyInterface
@@ -0,0 +1 @@
fun test() = Number:<caret>:toInt
@@ -0,0 +1,2 @@
expression: Number::toInt
receiver:: type: kotlin.Number
@@ -0,0 +1 @@
fun test(a: Number) = a:<caret>:toInt
@@ -0,0 +1,2 @@
expression: a::toInt
receiver:: type: kotlin.Number