From b7e99a75ad5d4699aa7caf1bdefb6c5d2f58914a Mon Sep 17 00:00:00 2001 From: "Vitaliy.Bibaev" Date: Wed, 20 Dec 2017 18:27:49 +0300 Subject: [PATCH] Use index by array name instead of elements name in KotlinTypes --- .../debugger/streams/kotlin/trace/dsl/KotlinTypes.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/idea/idea-jvm/src/com/intellij/debugger/streams/kotlin/trace/dsl/KotlinTypes.kt b/idea/idea-jvm/src/com/intellij/debugger/streams/kotlin/trace/dsl/KotlinTypes.kt index 3844145401f..fd964da8f70 100644 --- a/idea/idea-jvm/src/com/intellij/debugger/streams/kotlin/trace/dsl/KotlinTypes.kt +++ b/idea/idea-jvm/src/com/intellij/debugger/streams/kotlin/trace/dsl/KotlinTypes.kt @@ -65,9 +65,14 @@ object KotlinTypes : Types { } } - private val primitiveTypesIndex: Map = listOf(KotlinTypes.BOOLEAN, KotlinTypes.BYTE, KotlinTypes.INT, KotlinTypes.SHORT, - KotlinTypes.CHAR, KotlinTypes.LONG, KotlinTypes.FLOAT, KotlinTypes.DOUBLE).associate { it.genericTypeName to it } - private val primitiveArraysIndex: Map = primitiveTypesIndex.asSequence().associate { it.key to array(it.value) } + private val primitiveTypesIndex: Map = + listOf(KotlinTypes.BOOLEAN, KotlinTypes.BYTE, KotlinTypes.INT, KotlinTypes.SHORT, + KotlinTypes.CHAR, KotlinTypes.LONG, KotlinTypes.FLOAT, KotlinTypes.DOUBLE) + .associate { it.genericTypeName to it } + + private val primitiveArraysIndex: Map = primitiveTypesIndex.asSequence() + .map { array(it.value) } + .associate { it.genericTypeName to it } fun primitiveTypeByName(typeName: String): GenericType? = primitiveTypesIndex[typeName]