From d10fa8f8914dbac535a9d4c88b114c433d3294c3 Mon Sep 17 00:00:00 2001 From: Alexey Sedunov Date: Wed, 2 Aug 2017 15:11:24 +0300 Subject: [PATCH] Minor: Fix array detection --- .../kotlin/cli/common/arguments/parseCommandLineArguments.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt index 0525f3bfca5..b5493789de4 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt @@ -17,6 +17,7 @@ package org.jetbrains.kotlin.cli.common.arguments import com.intellij.util.SmartList +import kotlin.reflect.KClass import kotlin.reflect.KMutableProperty1 import kotlin.reflect.full.findAnnotation import kotlin.reflect.full.memberProperties @@ -124,7 +125,7 @@ fun parseCommandLineArguments(args: List, resu } } - if (argumentField.property.returnType.classifier?.javaClass?.isArray == false + if ((argumentField.property.returnType.classifier as? KClass<*>)?.java?.isArray == false && !visitedArgs.add(argument.value) && value is String && property.get(result) != value) { errors.duplicateArguments.put(argument.value, value) }