From 008703c1dc351951ea06010cf2dfaffd4e2c2988 Mon Sep 17 00:00:00 2001 From: Nikolay Lunyak Date: Wed, 25 Oct 2023 15:11:35 +0300 Subject: [PATCH] [FIR] Fix parameters constraints in `FirDeclarationCollector.collect` --- .../kotlin/fir/analysis/checkers/FirConflictsHelpers.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConflictsHelpers.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConflictsHelpers.kt index ca539d44947..7f64228a6d8 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConflictsHelpers.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConflictsHelpers.kt @@ -152,7 +152,7 @@ class FirDeclarationCollector>( fun FirDeclarationCollector>.collectClassMembers(klass: FirRegularClassSymbol) { val otherDeclarations = mutableMapOf>>() - val functionDeclarations = mutableMapOf>>() + val functionDeclarations = mutableMapOf>>() val declaredMemberScope = klass.declaredMemberScope(context) val unsubstitutedScope = klass.unsubstitutedScope(context) @@ -277,10 +277,10 @@ fun collectConflictingLocalFunctionsFrom(block: FirBlock, context: CheckerContex return inspector.declarationConflictingSymbols } -private fun > FirDeclarationCollector.collect( - declaration: D, +private fun , S : D> FirDeclarationCollector.collect( + declaration: S, representation: String, - map: MutableMap>, + map: MutableMap>, ) { map.getOrPut(representation, ::mutableListOf).also { it.add(declaration)