diff --git a/jps/jps-common/src/org/jetbrains/kotlin/arguments/CompilerArgumentsContentProspector.kt b/jps/jps-common/src/org/jetbrains/kotlin/arguments/CompilerArgumentsContentProspector.kt index e67fc4a1b57..92b01d4659c 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/arguments/CompilerArgumentsContentProspector.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/arguments/CompilerArgumentsContentProspector.kt @@ -23,8 +23,9 @@ object CompilerArgumentsContentProspector { private val arrayArgumentPropertiesCache: MutableMap, Collection?>>> = mutableMapOf() - private fun getCompilerArgumentsProperties(kClass: KClass) = + private fun getCompilerArgumentsProperties(kClass: KClass) = argumentPropertiesCache.getOrPut(kClass) { kClass.memberProperties.filter { prop -> prop.annotations.any { it is Argument } } + } private inline fun Collection>.filterByReturnType(predicate: (KType?) -> Boolean) = filter { predicate(it.returnType) }.mapNotNull { it.safeAs>() }