Fix OOM when there are several lambdas with extension function types

#KT-41335 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-08-26 10:43:55 +03:00
parent 085e0dc1de
commit 567e6ca9ca
9 changed files with 78 additions and 1 deletions
@@ -94,7 +94,7 @@ class PostponedArgumentInputTypesResolver(
getDeclaredParametersFromRelatedLambdas(argument, postponedArguments, variableDependencyProvider)
val annotationsFromConstraints = functionalTypesFromConstraints?.run {
Annotations.create(flatMap { it.type.annotations })
Annotations.create(flatMapTo(SmartSet.create()) { it.type.annotations }.toList())
} ?: Annotations.EMPTY
val annotations = if (isThereExtensionFunctionAmongRelatedLambdas) {