FIR IDE: add tests about types of array/list and their element
This commit is contained in:
committed by
Ilya Kirillov
parent
e1f6c19c83
commit
08e181a543
+5
@@ -0,0 +1,5 @@
|
||||
fun foo() {
|
||||
val arr = arrayOfNulls<List<*>>(10)
|
||||
arr[0] = emptyList<Any>()
|
||||
<expr>arr[0]</expr>
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: arr[0]
|
||||
type: kotlin.collections.List<*>?
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo() {
|
||||
val arr = arrayOfNulls<List<*>>(10)
|
||||
<expr>arr</expr>[0] = emptyList<Any>()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: arr
|
||||
type: kotlin.Array<kotlin.collections.List<*>?>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_STDLIB
|
||||
fun foo() {
|
||||
val lst = listOf<List<*>>(listOf("A"), listOf(42), emptyList())
|
||||
<expr>lst[0]</expr>
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: lst[0]
|
||||
type: kotlin.collections.List<*>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
fun foo() {
|
||||
val lst = mutableListOf<List<*>>()
|
||||
lst[0] = emptyList<Any>()
|
||||
<expr>lst[0]</expr>
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: lst[0]
|
||||
type: kotlin.collections.List<*>
|
||||
@@ -0,0 +1,5 @@
|
||||
// WITH_STDLIB
|
||||
fun foo() {
|
||||
val lst = listOf<List<*>>(listOf("A"), listOf(42), emptyList())
|
||||
<expr>lst</expr>[0]
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
expression: lst
|
||||
type: kotlin.collections.List<kotlin.collections.List<*>>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_STDLIB
|
||||
fun foo() {
|
||||
val lst = mutableListOf<List<*>>()
|
||||
<expr>lst</expr>[0] = emptyList<Any>()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: lst
|
||||
type: kotlin.collections.MutableList<kotlin.collections.List<*>>
|
||||
Reference in New Issue
Block a user