[kotlin] Fixed postfix templates for kotlin/*Array

#KTIJ-31254 Fixed

GitOrigin-RevId: f5a9bfae92387d015d1a464d29a07edd8f60aebd
This commit is contained in:
Vladimir Dolzhenko
2024-09-29 22:03:34 +02:00
committed by intellij-monorepo-bot
parent 75a2a5a08e
commit 189c7bd7ed
4 changed files with 21 additions and 0 deletions

View File

@@ -142,6 +142,14 @@ private val INT_CLASS_ID = ClassId.fromString("kotlin/Int")
private val ITERABLE_CLASS_IDS: Set<ClassId> = setOf(
ClassId.fromString("kotlin/Array"),
ClassId.fromString("kotlin/BooleanArray"),
ClassId.fromString("kotlin/ByteArray"),
ClassId.fromString("kotlin/CharArray"),
ClassId.fromString("kotlin/DoubleArray"),
ClassId.fromString("kotlin/FloatArray"),
ClassId.fromString("kotlin/IntArray"),
ClassId.fromString("kotlin/LongArray"),
ClassId.fromString("kotlin/ShortArray"),
ClassId.fromString("kotlin/collections/Iterable"),
ClassId.fromString("kotlin/collections/Map"),
ClassId.fromString("kotlin/sequences/Sequence"),

View File

@@ -136,6 +136,11 @@ public abstract class K2PostfixTemplateTestGenerated extends AbstractK2PostfixTe
performTest();
}
@TestMetadata("intArray.kt")
public void testIntArray() throws Exception {
performTest();
}
@TestMetadata("list.kt")
public void testList() throws Exception {
performTest();

View File

@@ -0,0 +1,5 @@
fun test() {
for (i in intArrayOf(1, 2, 3)) {
}
}

View File

@@ -0,0 +1,3 @@
fun test() {
intArrayOf(1, 2, 3)<caret>
}