diff --git a/compiler/src/main/kotlin/com/ivianuu/injekt/compiler/resolution/InjektType.kt b/compiler/src/main/kotlin/com/ivianuu/injekt/compiler/resolution/InjektType.kt index 49845b787..1e153fcde 100644 --- a/compiler/src/main/kotlin/com/ivianuu/injekt/compiler/resolution/InjektType.kt +++ b/compiler/src/main/kotlin/com/ivianuu/injekt/compiler/resolution/InjektType.kt @@ -64,8 +64,7 @@ fun ClassifierDescriptor.toInjektClassifier(ctx: Context): InjektClassifier = val typeParameters = safeAs() ?.declaredTypeParameters - ?.map { it.toInjektClassifier(ctx) } - ?.toMutableList() + ?.mapTo(mutableListOf()) { it.toInjektClassifier(ctx) } ?: mutableListOf() val isTag = hasAnnotation(InjektFqNames.Tag) || fqNameSafe == InjektFqNames.Composable