Analysis API: fix getKtExpressionType for array assignment target

This commit is contained in:
Ilya Kirillov
2021-12-31 12:57:56 +03:00
parent a5ebd3c716
commit af789346f5
12 changed files with 100 additions and 1 deletions
@@ -0,0 +1,2 @@
expression: arr[0]
type: kotlin.Unit
@@ -0,0 +1,4 @@
fun foo() {
val arr = arrayOfNulls<List<*>>(10)
<expr>arr[0]</expr> = emptyList<Any>()
}
@@ -0,0 +1,2 @@
expression: arr[0]
type: kotlin.collections.List<*>?
@@ -0,0 +1,4 @@
fun foo() {
val arr = 1
<expr>arr[0]</expr> = 1
}
@@ -0,0 +1,2 @@
expression: arr[0]
type: ERROR_TYPE <Unresolved name: set>
@@ -0,0 +1,4 @@
fun foo() {
val arr = intArrayOf()
<expr>arr[0]</expr> += 1
}
@@ -0,0 +1,2 @@
expression: arr[0]
type: kotlin.Int