Analysis API: fix getKtExpressionType for array assignment target
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
expression: arr[0]
|
||||
type: kotlin.Unit
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo() {
|
||||
val arr = arrayOfNulls<List<*>>(10)
|
||||
<expr>arr[0]</expr> = emptyList<Any>()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: arr[0]
|
||||
type: kotlin.collections.List<*>?
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: arr[0]
|
||||
type: kotlin.Unit
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo() {
|
||||
val arr = 1
|
||||
<expr>arr[0]</expr> = 1
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: arr[0]
|
||||
type: ERROR_TYPE <Unresolved name: set>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo() {
|
||||
val arr = intArrayOf()
|
||||
<expr>arr[0]</expr> += 1
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: arr[0]
|
||||
type: kotlin.Int
|
||||
Reference in New Issue
Block a user