From da60be06a05541120f2aa116a18a9ec8499377f3 Mon Sep 17 00:00:00 2001 From: Nikolay Lunyak Date: Fri, 30 Jun 2023 18:21:20 +0300 Subject: [PATCH] [FIR] Add references to TODOs in checkers --- .../kotlin/fir/analysis/cfa/FirCallsEffectAnalyzer.kt | 2 +- .../kotlin/fir/analysis/cfa/FirReturnsImpliesAnalyzer.kt | 6 +++--- .../fir/analysis/checkers/FirCastDiagnosticsHelpers.kt | 2 +- .../kotlin/fir/analysis/checkers/FirConstChecks.kt | 8 ++++---- .../jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt | 4 ++-- .../kotlin/fir/analysis/checkers/FirSinceKotlinHelpers.kt | 4 ++-- .../analysis/checkers/declaration/FirContractChecker.kt | 2 +- .../checkers/declaration/FirMemberPropertiesChecker.kt | 2 +- .../checkers/declaration/FirSealedSupertypeChecker.kt | 2 +- .../checkers/declaration/FirTailrecFunctionChecker.kt | 2 +- .../checkers/declaration/FirTopLevelPropertiesChecker.kt | 2 +- .../checkers/expression/FirClassLiteralChecker.kt | 2 +- .../checkers/expression/FirOptInUsageBaseChecker.kt | 2 +- .../fir/analysis/checkers/extended/UnusedChecker.kt | 8 ++++---- .../checkers/extended/UselessCallOnNotNullChecker.kt | 2 +- .../checkers/syntax/FirExplicitApiDeclarationChecker.kt | 2 +- .../fir/analysis/diagnostics/FirDiagnosticRenderers.kt | 2 +- .../analysis/diagnostics/coneDiagnosticToFirDiagnostic.kt | 4 ++-- 18 files changed, 29 insertions(+), 29 deletions(-) diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirCallsEffectAnalyzer.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirCallsEffectAnalyzer.kt index 113afce4407..1e4a60f9f4f 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirCallsEffectAnalyzer.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirCallsEffectAnalyzer.kt @@ -39,7 +39,7 @@ import kotlin.contracts.contract object FirCallsEffectAnalyzer : FirControlFlowChecker() { override fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter, context: CheckerContext) { - // TODO: this is quadratic due to `graph.traverse`, surely there is a better way? + // TODO, KT-59816: this is quadratic due to `graph.traverse`, surely there is a better way? for (subGraph in graph.subGraphs) { analyze(subGraph, reporter, context) } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirReturnsImpliesAnalyzer.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirReturnsImpliesAnalyzer.kt index 2a95fb35f06..9f9a6163316 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirReturnsImpliesAnalyzer.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirReturnsImpliesAnalyzer.kt @@ -57,7 +57,7 @@ object FirReturnsImpliesAnalyzer : FirControlFlowChecker() { isWrongConditionOnNode(it, coneEffect, returnValue, function, logicSystem, dataFlowInfo, context) } if (wrongCondition) { - // TODO: reportOn(firEffect.source, ...) + // TODO, KT-59813: reportOn(firEffect.source, ...) reporter.reportOn(function.contractDescription.source, FirErrors.WRONG_IMPLIES_CONDITION, context) } } @@ -106,10 +106,10 @@ object FirReturnsImpliesAnalyzer : FirControlFlowChecker() { } } - // TODO: if this is not a top-level function, `FirDataFlowAnalyzer` has erased its value parameters + // TODO, KT-59814: if this is not a top-level function, `FirDataFlowAnalyzer` has erased its value parameters // from `dataFlowInfo.variableStorage` for some reason, so its `getLocalVariable` doesn't work. val knownVariables = flow.knownVariables.associateBy { it.identifier } - // TODO: these should be the same on all return paths, so maybe don't recompute them every time? + // TODO, KT-59815: these should be the same on all return paths, so maybe don't recompute them every time? val argumentVariables = Array(function.valueParameters.size + 1) { i -> val parameterSymbol = if (i > 0) { function.valueParameters[i - 1].symbol diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirCastDiagnosticsHelpers.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirCastDiagnosticsHelpers.kt index f410c7762e3..84d334d5dc9 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirCastDiagnosticsHelpers.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirCastDiagnosticsHelpers.kt @@ -258,7 +258,7 @@ fun ConeKotlinType.isNonReifiedTypeParameter(): Boolean { fun shouldCheckForExactType(expression: FirTypeOperatorCall, context: CheckerContext): Boolean { return when (expression.operation) { FirOperation.IS, FirOperation.NOT_IS -> false - // TODO: differentiate if this expression defines the enclosing thing's type + // TODO, KT-59820: differentiate if this expression defines the enclosing thing's type // e.g., // val c1 get() = 1 as Number // val c2: Number get() = 1 as Number diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConstChecks.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConstChecks.kt index 51f54973667..3518d79f135 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConstChecks.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConstChecks.kt @@ -101,7 +101,7 @@ internal fun checkConstantArguments( //DO NOTHING } expressionSymbol is FirFieldSymbol -> { - //TODO: fix checking of Java fields initializer + //TODO, KT-59821: fix checking of Java fields initializer if (!expressionSymbol.isStatic || expressionSymbol.modality != Modality.FINAL) { return ConstantArgumentKind.NOT_CONST } @@ -125,7 +125,7 @@ internal fun checkConstantArguments( return ConstantArgumentKind.NOT_KCLASS_LITERAL } - //TODO: UNRESOLVED REFERENCE + //TODO, KT-59822: UNRESOLVED REFERENCE if (expression.dispatchReceiver is FirThisReceiverExpression) { return null } @@ -140,7 +140,7 @@ internal fun checkConstantArguments( for (exp in expression.arguments.plus(expression.dispatchReceiver).plus(expression.extensionReceiver)) { if (exp is FirNoReceiverExpression) continue val expClassId = exp.typeRef.coneType.lowerBoundIfFlexible().classId - // TODO: add annotation for allowed constant types + // TODO, KT-59823: add annotation for allowed constant types if (expClassId !in StandardClassIds.constantAllowedTypes) { return ConstantArgumentKind.NOT_CONST } @@ -168,7 +168,7 @@ internal fun checkConstantArguments( propertySymbol.isLocal || propertySymbol.callableId.className?.isRoot == false -> return ConstantArgumentKind.NOT_CONST expressionType.classId == StandardClassIds.KClass -> return ConstantArgumentKind.NOT_KCLASS_LITERAL - //TODO: UNRESOLVED REFERENCE + //TODO, KT-59822: UNRESOLVED REFERENCE expression.dispatchReceiver is FirThisReceiverExpression -> return null } return when (property.initializer) { diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt index f6457a9bf22..9234e645686 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt @@ -384,7 +384,7 @@ fun FirCallableSymbol<*>.getImplementationStatus( ) { return ImplementationStatus.INHERITED_OR_SYNTHESIZED } - // TODO: suspend function overridden by a Java class in the middle is not properly regarded as an override + // TODO, KT-59818: suspend function overridden by a Java class in the middle is not properly regarded as an override if (isSuspend) { return ImplementationStatus.INHERITED_OR_SYNTHESIZED } @@ -670,7 +670,7 @@ fun getActualTargetList(container: FirAnnotationContainer): AnnotationTargetList } else { TargetLists.T_OBJECT_LITERAL } -// TODO: properly implement those cases +// TODO, KT-59819: properly implement those cases // is KtDestructuringDeclarationEntry -> TargetLists.T_LOCAL_VARIABLE // is KtDestructuringDeclaration -> TargetLists.T_DESTRUCTURING_DECLARATION // is KtLambdaExpression -> TargetLists.T_FUNCTION_LITERAL diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirSinceKotlinHelpers.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirSinceKotlinHelpers.kt index 1d566128d91..7a04e0c1c9c 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirSinceKotlinHelpers.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirSinceKotlinHelpers.kt @@ -62,14 +62,14 @@ fun FirDeclaration.checkSinceKotlinVersionAccessibility(context: CheckerContext) private fun FirDeclaration.getOwnSinceKotlinVersion(session: FirSession): FirSinceKotlinValue? { var result: FirSinceKotlinValue? = null - // TODO: use-site targeted annotations + // TODO, KT-59824: use-site targeted annotations fun FirDeclaration.consider() { val sinceKotlinSingleArgument = getAnnotationByClassId(StandardClassIds.Annotations.SinceKotlin, session)?.findArgumentByName( StandardClassIds.Annotations.ParameterNames.sinceKotlinVersion ) val apiVersion = ((sinceKotlinSingleArgument as? FirConstExpression<*>)?.value as? String)?.let(ApiVersion.Companion::parse) if (apiVersion != null) { - // TODO: combine wasExperimentalMarkerClasses in case of several associated declarations with the same maximal API version + // TODO, KT-59825: combine wasExperimentalMarkerClasses in case of several associated declarations with the same maximal API version if (result == null || apiVersion > result!!.apiVersion) { result = FirSinceKotlinValue(apiVersion, loadWasExperimentalMarkerClasses(session)) } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirContractChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirContractChecker.kt index b41efd7defa..3aa2e04ab91 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirContractChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirContractChecker.kt @@ -45,7 +45,7 @@ object FirContractChecker : FirFunctionChecker() { for (unresolvedEffect in contractDescription.unresolvedEffects) { val diagnostic = unresolvedEffect.effect.accept(DiagnosticExtractor, null) ?: continue - // TODO: report on fine-grained locations, e.g., ... implies unresolved => report on unresolved, not the entire statement. + // TODO, KT-59806: report on fine-grained locations, e.g., ... implies unresolved => report on unresolved, not the entire statement. // but, sometimes, it's just reported on `contract`... reporter.reportOn(unresolvedEffect.source, FirErrors.ERROR_IN_CONTRACT_DESCRIPTION, diagnostic.reason, context) } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberPropertiesChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberPropertiesChecker.kt index 2ea3e8b984a..eb46fe51562 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberPropertiesChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberPropertiesChecker.kt @@ -50,7 +50,7 @@ object FirMemberPropertiesChecker : FirClassChecker() { (it.symbol as? FirPropertySymbol)?.takeIf { symbol -> symbol.requiresInitialization(isForClassInitialization = true) } } if (memberPropertySymbols.isEmpty()) return null - // TODO: merge with `FirPropertyInitializationAnalyzer` for fewer passes. + // TODO, KT-59803: merge with `FirPropertyInitializationAnalyzer` for fewer passes. val data = PropertyInitializationInfoData(memberPropertySymbols, symbol, graph) data.checkPropertyAccesses(isForClassInitialization = true, context, reporter) return data.getValue(graph.exitNode)[NormalPath] diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSealedSupertypeChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSealedSupertypeChecker.kt index 111729e30ab..ff1c727eb95 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSealedSupertypeChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSealedSupertypeChecker.kt @@ -52,7 +52,7 @@ object FirSealedSupertypeChecker : FirClassChecker() { reporter.reportOn(superTypeRef.source, FirErrors.SEALED_INHERITOR_IN_DIFFERENT_PACKAGE, context) } if (superClass.moduleData != declaration.moduleData) { - // TODO: implement logic like in org.jetbrains.kotlin.resolve.checkers.SealedInheritorInSameModuleChecker for MPP support. + // TODO, KT-59804: implement logic like in org.jetbrains.kotlin.resolve.checkers.SealedInheritorInSameModuleChecker for MPP support. reporter.reportOn(superTypeRef.source, FirErrors.SEALED_INHERITOR_IN_DIFFERENT_MODULE, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTailrecFunctionChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTailrecFunctionChecker.kt index 7ebfe8e9ba8..258c878dfb1 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTailrecFunctionChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTailrecFunctionChecker.kt @@ -32,7 +32,7 @@ object FirTailrecFunctionChecker : FirSimpleFunctionChecker() { } val graph = declaration.controlFlowGraphReference?.controlFlowGraph ?: return - // TODO: this is not how CFG works, tail calls inside try-catch should be detected by FIR tree traversal. + // TODO, KT-59668: this is not how CFG works, tail calls inside try-catch should be detected by FIR tree traversal. var tryScopeCount = 0 var catchScopeCount = 0 var finallyScopeCount = 0 diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelPropertiesChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelPropertiesChecker.kt index 1c096495365..6523fa6a080 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelPropertiesChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelPropertiesChecker.kt @@ -140,7 +140,7 @@ internal fun checkPropertyInitializer( if (isExpect) { reporter.reportOn(propertySource, FirErrors.EXPECTED_LATEINIT_PROPERTY, context) } - // TODO: like [BindingContext.MUST_BE_LATEINIT], we should consider variable with uninitialized error. + // TODO, KT-59807: like [BindingContext.MUST_BE_LATEINIT], we should consider variable with uninitialized error. if (backingFieldRequired && !inInterface && isCorrectlyInitialized) { if (context.languageVersionSettings.supportsFeature(LanguageFeature.EnableDfaWarningsInK2)) { reporter.reportOn(propertySource, FirErrors.UNNECESSARY_LATEINIT, context) diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirClassLiteralChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirClassLiteralChecker.kt index 7e0cf9fbc58..5db8ce57aa0 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirClassLiteralChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirClassLiteralChecker.kt @@ -73,7 +73,7 @@ object FirClassLiteralChecker : FirGetClassCallChecker() { } if (argument !is FirResolvedQualifier) return - // TODO: differentiate RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS + // TODO, KT-59835: differentiate RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS if (argument.typeArguments.isNotEmpty() && !argument.typeRef.coneType.fullyExpandedType(context.session).isAllowedInClassLiteral(context)) { val symbol = argument.symbol symbol?.lazyResolveToPhase(FirResolvePhase.TYPES) diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt index 7fb74cbcf5e..08a45801a62 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt @@ -174,7 +174,7 @@ object FirOptInUsageBaseChecker { } } - // TODO: getAnnotationsOnContainingModule + // TODO, KT-59802: getAnnotationsOnContainingModule return result } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UnusedChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UnusedChecker.kt index 4ad7825b29d..3ebdea5ac03 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UnusedChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UnusedChecker.kt @@ -49,7 +49,7 @@ object UnusedChecker : AbstractFirPropertyInitializationChecker() { for (dataPerLabel in dataPerNode.values) { val data = dataPerLabel[variableSymbol] ?: continue if (data == VariableStatus.ONLY_WRITTEN_NEVER_READ) { - // todo: report case like "a += 1" where `a` `doesn't writes` different way (special for Idea) + // TODO, KT-59831: report case like "a += 1" where `a` `doesn't writes` different way (special for Idea) val source = node.fir.lValue.source reporter.reportOn(source, FirErrors.ASSIGNED_VALUE_IS_NEVER_READ, context) // To avoid duplicate reports, stop investigating remaining paths once reported. @@ -63,7 +63,7 @@ object UnusedChecker : AbstractFirPropertyInitializationChecker() { if (node.fir.source == null) return if (variableSymbol.isLoopIterator) return val dataPerNode = data[node] ?: return - // TODO: merge values for labels, otherwise diagnostics are inconsistent + // TODO, KT-59832: merge values for labels, otherwise diagnostics are inconsistent for (dataPerLabel in dataPerNode.values) { val data = dataPerLabel[variableSymbol] ?: continue @@ -117,7 +117,7 @@ object UnusedChecker : AbstractFirPropertyInitializationChecker() { else variableUseState return base.also { - // TODO: is this modifying constant enum values??? + // TODO, KT-59833: is this modifying constant enum values??? it.isRead = this.isRead || variableUseState?.isRead == true it.isRedundantInit = this.isRedundantInit && variableUseState?.isRedundantInit == true } @@ -146,7 +146,7 @@ object UnusedChecker : AbstractFirPropertyInitializationChecker() { } override fun plus(other: VariableStatusInfo): VariableStatusInfo = - merge(other) // TODO: not sure + merge(other) // TODO, KT-59834: not sure } private class ValueWritesWithoutReading( diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UselessCallOnNotNullChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UselessCallOnNotNullChecker.kt index 341c963bf4c..bf320345634 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UselessCallOnNotNullChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UselessCallOnNotNullChecker.kt @@ -19,7 +19,7 @@ import org.jetbrains.kotlin.fir.types.coneType import org.jetbrains.kotlin.name.CallableId object UselessCallOnNotNullChecker : FirQualifiedAccessExpressionChecker() { - // todo: add 'call may be reduced' in cases like 's?.isNullOrEmpty()' where 's: String? = ""' + // todo, KT-59829: add 'call may be reduced' in cases like 's?.isNullOrEmpty()' where 's: String? = ""' override fun check(expression: FirQualifiedAccessExpression, context: CheckerContext, reporter: DiagnosticReporter) { val method = expression.getCallableId() ?: return val calleeOn = expression.explicitReceiver ?: return diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/syntax/FirExplicitApiDeclarationChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/syntax/FirExplicitApiDeclarationChecker.kt index 44917435344..9a6fc03c8e8 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/syntax/FirExplicitApiDeclarationChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/syntax/FirExplicitApiDeclarationChecker.kt @@ -85,7 +85,7 @@ object FirExplicitApiDeclarationChecker : FirDeclarationSyntaxChecker - // TODO: need a way to tune granuality, e.g., without parameter names in functional types. + // TODO, KT-59811: need a way to tune granuality, e.g., without parameter names in functional types. t.renderReadableWithFqNames() } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/coneDiagnosticToFirDiagnostic.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/coneDiagnosticToFirDiagnostic.kt index fc3b414e198..fbc507c952e 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/coneDiagnosticToFirDiagnostic.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/coneDiagnosticToFirDiagnostic.kt @@ -191,7 +191,7 @@ private fun mapUnsafeCallError( (candidateFunctionSymbol?.isOperator == true || candidateFunctionSymbol?.isInfix == true) ) { // For augmented assignment operations (e.g., `a += b`), the source is the entire binary expression (BINARY_EXPRESSION). - // TODO: No need to check for source.elementType == BINARY_EXPRESSION if we use operator as callee reference source + // TODO, KT-59809: No need to check for source.elementType == BINARY_EXPRESSION if we use operator as callee reference source // (see FirExpressionsResolveTransformer.transformAssignmentOperatorStatement) val operationSource = if (source.elementType == KtNodeTypes.BINARY_EXPRESSION) { source.getChild(KtNodeTypes.OPERATION_REFERENCE) @@ -387,7 +387,7 @@ private fun ConstraintSystemError.toDiagnostic( val position = position.from val argument = when (position) { - // TODO: Support other ReceiverConstraintPositionImpl, LHSArgumentConstraintPositionImpl + // TODO, KT-59810: Support other ReceiverConstraintPositionImpl, LHSArgumentConstraintPositionImpl is ConeArgumentConstraintPosition -> position.argument is ConeLambdaArgumentConstraintPosition -> position.lambda else -> null