Fix incorrect builder inference usage

This commit is contained in:
Victor Petukhov
2021-05-27 10:32:56 +03:00
parent 76c15e4444
commit f4788b479c
4 changed files with 4 additions and 4 deletions
@@ -131,7 +131,7 @@ class JvmMappedScope(
// NOTE: No-arg constructors // NOTE: No-arg constructors
@OptIn(ExperimentalStdlibApi::class) @OptIn(ExperimentalStdlibApi::class)
private val additionalHiddenConstructors = buildSet { private val additionalHiddenConstructors = buildSet<String> {
// kotlin.text.String pseudo-constructors should be used instead of java.lang.String constructors // kotlin.text.String pseudo-constructors should be used instead of java.lang.String constructors
listOf( listOf(
"", "",
@@ -63,7 +63,7 @@ class FirWhenExhaustivenessTransformer(private val bodyResolveComponents: BodyRe
val checkers = buildList { val checkers = buildList {
exhaustivenessCheckers.filterTo(this) { it.isApplicable(cleanSubjectType, session) } exhaustivenessCheckers.filterTo(this) { it.isApplicable(cleanSubjectType, session) }
if (isNotEmpty() && cleanSubjectType.isMarkedNullable) { if (isNotEmpty<WhenExhaustivenessChecker>() && cleanSubjectType.isMarkedNullable) {
add(WhenOnNullableExhaustivenessChecker) add(WhenOnNullableExhaustivenessChecker)
} }
} }
@@ -101,7 +101,7 @@ object KtDeclarationAndFirDeclarationEqualityChecker {
} }
@OptIn(ExperimentalStdlibApi::class) @OptIn(ExperimentalStdlibApi::class)
private val classIdToName: Map<String, String> = buildList { private val classIdToName: Map<String, String> = buildList<Pair<String, String>> {
StandardClassIds.primitiveArrayTypeByElementType.mapTo(this) { (classId, arrayClassId) -> StandardClassIds.primitiveArrayTypeByElementType.mapTo(this) { (classId, arrayClassId) ->
classId.asString().replace('/', '.') to arrayClassId.asString().replace('/', '.') classId.asString().replace('/', '.') to arrayClassId.asString().replace('/', '.')
} }
@@ -162,7 +162,7 @@ internal class KtFirScopeProvider(
val firLocalScopes = towerDataContext.localScopes val firLocalScopes = towerDataContext.localScopes
@OptIn(ExperimentalStdlibApi::class) @OptIn(ExperimentalStdlibApi::class)
val allKtScopes = buildList { val allKtScopes = buildList<KtScope> {
implicitReceiverScopes.mapTo(this, ::convertToKtScope) implicitReceiverScopes.mapTo(this, ::convertToKtScope)
nonLocalScopes.mapTo(this, ::convertToKtScope) nonLocalScopes.mapTo(this, ::convertToKtScope)
firLocalScopes.mapTo(this, ::convertToKtScope) firLocalScopes.mapTo(this, ::convertToKtScope)