wip shit
diff --git a/analysis/decompiled/decompiler-to-psi/src/org/jetbrains/kotlin/analysis/decompiler/psi/text/ByDescriptorIndexer.kt b/analysis/decompiled/decompiler-to-psi/src/org/jetbrains/kotlin/analysis/decompiler/psi/text/ByDescriptorIndexer.kt
index b27c15c..57b37c8 100644
--- a/analysis/decompiled/decompiler-to-psi/src/org/jetbrains/kotlin/analysis/decompiler/psi/text/ByDescriptorIndexer.kt
+++ b/analysis/decompiled/decompiler-to-psi/src/org/jetbrains/kotlin/analysis/decompiler/psi/text/ByDescriptorIndexer.kt
@@ -111,7 +111,7 @@
private fun typeParametersMatch(declaration: KtCallableDeclaration, descriptor: CallableDescriptor): Boolean {
if (declaration.typeParameters.size != declaration.typeParameters.size) return false
val boundsByName = declaration.typeConstraints.groupBy { it.subjectTypeParameterName?.getReferencedName() }
- descriptor.typeParameters.zip(declaration.typeParameters) { descriptorTypeParam, psiTypeParameter ->
+ val _ = descriptor.typeParameters.zip(declaration.typeParameters) { descriptorTypeParam, psiTypeParameter ->
if (descriptorTypeParam.name.toString() != psiTypeParameter.name) return false
val psiBounds = mutableListOf<KtTypeReference>()
psiBounds.addIfNotNull(psiTypeParameter.extendsBound)
diff --git a/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/clsStubBuilding.kt b/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/clsStubBuilding.kt
index 0ab3e5a..5e56134 100644
--- a/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/clsStubBuilding.kt
+++ b/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/clsStubBuilding.kt
@@ -170,7 +170,7 @@
val lastSegment = segments[level]
val userTypeStub = KotlinUserTypeStubImpl(current, upperBoundFun?.invoke(level), abbreviatedType.takeIf { level == 0 })
if (level + 1 < segments.size) {
- recCreateStubForType(userTypeStub, level + 1)
+ val _ = recCreateStubForType(userTypeStub, level + 1)
}
KotlinNameReferenceExpressionStubImpl(userTypeStub, lastSegment.ref(), level < classesNestedLevel)
if (!substituteWithAny) {
@@ -294,4 +294,4 @@
SpecialNames.isAnonymousParameterName(name) -> Name.identifier("_")
else -> name
}
-}
\ No newline at end of file
+}
diff --git a/analysis/decompiled/light-classes-for-decompiled/src/org/jetbrains/kotlin/analysis/decompiled/light/classes/origin/KotlinDeclarationInCompiledFileSearcher.kt b/analysis/decompiled/light-classes-for-decompiled/src/org/jetbrains/kotlin/analysis/decompiled/light/classes/origin/KotlinDeclarationInCompiledFileSearcher.kt
index 766caa5..5781d4c 100644
--- a/analysis/decompiled/light-classes-for-decompiled/src/org/jetbrains/kotlin/analysis/decompiled/light/classes/origin/KotlinDeclarationInCompiledFileSearcher.kt
+++ b/analysis/decompiled/light-classes-for-decompiled/src/org/jetbrains/kotlin/analysis/decompiled/light/classes/origin/KotlinDeclarationInCompiledFileSearcher.kt
@@ -244,7 +244,7 @@
private fun doTypeParameters(member: PsiMethod, ktNamedFunction: KtFunction): Boolean {
if (member.typeParameters.size != ktNamedFunction.typeParameters.size) return false
val boundsByName = ktNamedFunction.typeConstraints.groupBy { it.subjectTypeParameterName?.getReferencedName() }
- member.typeParameters.zip(ktNamedFunction.typeParameters) { psiTypeParam, ktTypeParameter ->
+ val _ = member.typeParameters.zip(ktNamedFunction.typeParameters) { psiTypeParam, ktTypeParameter ->
if (psiTypeParam.name.toString() != ktTypeParameter.name) return false
val psiBounds = mutableListOf<KtTypeReference>()
psiBounds.addIfNotNull(ktTypeParameter.extendsBound)
@@ -296,4 +296,4 @@
fun getInstance(): KotlinDeclarationInCompiledFileSearcher =
ApplicationManager.getApplication().getService(KotlinDeclarationInCompiledFileSearcher::class.java)
}
-}
\ No newline at end of file
+}
diff --git a/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt b/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt
index eb5495d..287c58a 100644
--- a/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt
+++ b/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt
@@ -204,6 +204,7 @@
return calcDifferenceForMembers(oldMembers, newMembers)
}
+ @Suppress("RETURN_VALUE_NOT_USED")
for (kind in diff) {
when (kind!!) {
ProtoBufClassKind.COMPANION_OBJECT_NAME -> {
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt
index 2ac3d7b..7ddcf85 100644
--- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt
+++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt
@@ -190,7 +190,7 @@
method.visitEnd()
if (continuationToRemove != null && coroutineTransformer.safeToRemoveContinuationClass(method.intermediate)) {
transformationResult.addClassToRemove(continuationToRemove)
- innerClassNodes.removeIf { it.name == oldContinuationName }
+ val _ = innerClassNodes.removeIf { it.name == oldContinuationName }
}
}
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InplaceArgumentsMethodTransformer.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InplaceArgumentsMethodTransformer.kt
index df7fbeb..a9537d8 100644
--- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InplaceArgumentsMethodTransformer.kt
+++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InplaceArgumentsMethodTransformer.kt
@@ -121,7 +121,7 @@
val next = insn.next
return when {
next is VarInsnNode && next.opcode in Opcodes.ISTORE..Opcodes.ASTORE -> {
- iter.next()
+ val _ = iter.next()
ArgContext(start, insn, calls, next)
}
insn.previous.isInplaceArgumentStartMarker() -> {
@@ -383,4 +383,4 @@
localVariable.end = newEnd ?: localVariable.start
}
}
-}
\ No newline at end of file
+}
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/RedundantCheckcastsBeforeAastoreMethodTransformer.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/RedundantCheckcastsBeforeAastoreMethodTransformer.kt
index bcdc8a2..fa07481 100644
--- a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/RedundantCheckcastsBeforeAastoreMethodTransformer.kt
+++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/RedundantCheckcastsBeforeAastoreMethodTransformer.kt
@@ -20,11 +20,11 @@
iter.remove()
if (isReified) {
for (i in 1..3) {
- iter.previous()
+ val _ = iter.previous()
iter.remove()
}
}
}
}
}
-}
\ No newline at end of file
+}
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/RedundantBoxingMethodTransformer.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/RedundantBoxingMethodTransformer.kt
index c53fee1..58fc067 100644
--- a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/RedundantBoxingMethodTransformer.kt
+++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/RedundantBoxingMethodTransformer.kt
@@ -243,7 +243,7 @@
val size = valueDescriptor.getTotalUnboxSize()
if (size < 2) continue
for (index in valueDescriptor.getVariablesIndexes()) {
- wideVars2SizeMinusOne.merge(index, size - 1, ::maxOf)
+ val _ = wideVars2SizeMinusOne.merge(index, size - 1, ::maxOf)
}
}
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt
index 267e892..da77ece 100644
--- a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt
+++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/KotlinTypeMapper.kt
@@ -714,7 +714,7 @@
},
processTypeArgument = { _, type, projectionKind, _, newMode ->
signatureVisitor.writeTypeArgument(projectionKind)
- mapType(type, signatureVisitor, newMode)
+ val _ = mapType(type, signatureVisitor, newMode)
signatureVisitor.writeTypeArgumentEnd()
}
)
@@ -793,7 +793,7 @@
for (i in 0 until typeParameter.upperBoundCount()) {
val type = typeParameter.getUpperBound(i)
if (type.typeConstructor().getTypeParameterClassifier() == null && !type.isInterfaceOrAnnotationClass()) {
- mapType(type, TypeMappingMode.GENERIC_ARGUMENT)
+ val _ = mapType(type, TypeMappingMode.GENERIC_ARGUMENT)
break
}
}
@@ -809,7 +809,7 @@
val type = typeParameter.getUpperBound(i)
if (type.typeConstructor().getTypeParameterClassifier() != null || type.isInterfaceOrAnnotationClass()) {
sw.writeInterfaceBound()
- mapType(type, TypeMappingMode.GENERIC_ARGUMENT)
+ val _ = mapType(type, TypeMappingMode.GENERIC_ARGUMENT)
sw.writeInterfaceBoundEnd()
}
}
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/CliJavaModuleFinder.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/CliJavaModuleFinder.kt
index a74f312..2ad336b 100644
--- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/CliJavaModuleFinder.kt
+++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/CliJavaModuleFinder.kt
@@ -98,7 +98,7 @@
get() = jdkRelease == null || jdkRelease == compilationJdkVersion
fun addUserModule(module: JavaModule) {
- userModules.putIfAbsent(module.name, module)
+ val _ = userModules.putIfAbsent(module.name, module)
}
val allObservableModules: Sequence<JavaModule>
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/JavaModuleGraph.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/JavaModuleGraph.kt
index 2759d7b..46aaae3 100644
--- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/JavaModuleGraph.kt
+++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/JavaModuleGraph.kt
@@ -35,7 +35,7 @@
val moduleInfo = (module(moduleName) as? JavaModule.Explicit)?.moduleInfo ?: return false
for ((dependencyModuleName, isTransitive) in moduleInfo.requires) {
if (isTransitive && visited.add(dependencyModuleName)) {
- dfs(dependencyModuleName)
+ val _ = dfs(dependencyModuleName)
}
}
return true
diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/Properties.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/Properties.kt
index 0aac7e0..fdd5dad 100644
--- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/Properties.kt
+++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/Properties.kt
@@ -69,7 +69,7 @@
return getProperFunction(systemPropertyGetter, System::getProperty)(property)
}
set(value) {
- getProperFunction(systemPropertySetter, System::setProperty)(property, value!!)
+ val _ = getProperFunction(systemPropertySetter, System::setProperty)(property, value!!)
}
val safeValue
diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt
index 1fa8131..b9882a2 100644
--- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt
+++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt
@@ -195,7 +195,7 @@
} else {
val newInternalArgument = parser.parseInternalArgument(arg, errors.value) ?: continue
// Manual language feature setting overrides the previous value of the same feature setting, if it exists.
- internalArguments.removeIf {
+ val _ = internalArguments.removeIf {
(it as? ManualLanguageFeatureSetting)?.languageFeature ==
(newInternalArgument as? ManualLanguageFeatureSetting)?.languageFeature
}
@@ -329,4 +329,3 @@
}
return null
}
-
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/FirSessionConstructionUtils.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/common/FirSessionConstructionUtils.kt
index f1e3504..0068c93 100644
--- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/FirSessionConstructionUtils.kt
+++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/FirSessionConstructionUtils.kt
@@ -322,7 +322,7 @@
val hmppModuleStructure = configuration.get(CommonConfigurationKeys.HMPP_MODULE_STRUCTURE)
val sharedLibrarySession = createSharedLibrarySession()
- createLibrarySession(sharedLibrarySession)
+ val _ = createLibrarySession(sharedLibrarySession)
val extraAnalysisMode = configuration.useFirExtraCheckers
val experimentalAnalysisMode = configuration.useFirExperimentalCheckers
val sessionConfigurator: FirSessionConfigurator.() -> Unit = {
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/pipeline/metadata/MetadataFrontendPipelinePhase.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/pipeline/metadata/MetadataFrontendPipelinePhase.kt
index b694e06..df8b822 100644
--- a/compiler/cli/src/org/jetbrains/kotlin/cli/pipeline/metadata/MetadataFrontendPipelinePhase.kt
+++ b/compiler/cli/src/org/jetbrains/kotlin/cli/pipeline/metadata/MetadataFrontendPipelinePhase.kt
@@ -155,7 +155,7 @@
outputs.runPlatformCheckers(diagnosticsReporter)
when (configuration.useLightTree) {
- true -> outputs.all { checkKotlinPackageUsageForLightTree(configuration, it.fir) }
+ true -> { val _ = outputs.all { checkKotlinPackageUsageForLightTree(configuration, it.fir) } }
false -> checkKotlinPackageUsageForPsi(configuration, sourceFiles.asKtFilesList())
}
diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt
index 68807f2..7d301cd 100644
--- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt
+++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt
@@ -258,7 +258,7 @@
if (state.sessions.isEmpty()) {
// TODO: and some goes here
}
- timer.schedule(0) {
+ val _ = timer.schedule(0) {
periodicAndAfterSessionCheck()
}
return CompileService.CallResult.Ok()
@@ -533,17 +533,17 @@
// }
fun startDaemonElections() {
- timer.schedule(10) {
+ val _ = timer.schedule(10) {
exceptionLoggingTimerThread { initiateElections() }
}
}
fun configurePeriodicActivities() {
log.info("Periodic liveness check activities configured")
- timer.schedule(delay = DAEMON_PERIODIC_CHECK_INTERVAL_MS, period = DAEMON_PERIODIC_CHECK_INTERVAL_MS) {
+ val _ = timer.schedule(delay = DAEMON_PERIODIC_CHECK_INTERVAL_MS, period = DAEMON_PERIODIC_CHECK_INTERVAL_MS) {
exceptionLoggingTimerThread { periodicAndAfterSessionCheck() }
}
- timer.schedule(delay = DAEMON_PERIODIC_SELDOM_CHECK_INTERVAL_MS + 100, period = DAEMON_PERIODIC_SELDOM_CHECK_INTERVAL_MS) {
+ val _ = timer.schedule(delay = DAEMON_PERIODIC_SELDOM_CHECK_INTERVAL_MS + 100, period = DAEMON_PERIODIC_SELDOM_CHECK_INTERVAL_MS) {
exceptionLoggingTimerThread { periodicSeldomCheck() }
}
}
@@ -1067,7 +1067,7 @@
val currentSessionId = state.sessions.lastSessionId
val currentCompilationsCount = compilationsCounter.get()
log.info("Delayed shutdown in ${daemonOptions.shutdownDelayMilliseconds}ms")
- timer.schedule(daemonOptions.shutdownDelayMilliseconds) {
+ val _ = timer.schedule(daemonOptions.shutdownDelayMilliseconds) {
state.delayedShutdownQueued.set(false)
if (currentClientsCount == state.clientsCounter &&
currentCompilationsCount == compilationsCounter.get() &&
@@ -1107,7 +1107,7 @@
if (!onAnotherThread) {
shutdownIfIdle()
} else {
- timer.schedule(1) {
+ val _ = timer.schedule(1) {
shutdownIfIdle()
}
}
diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinCompileDaemon.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinCompileDaemon.kt
index 1949dc6..2033b95 100644
--- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinCompileDaemon.kt
+++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinCompileDaemon.kt
@@ -205,7 +205,7 @@
onShutdown = {
if (daemonOptions.forceShutdownTimeoutMilliseconds != COMPILE_DAEMON_TIMEOUT_INFINITE_MS) {
// running a watcher thread that ensures that if the daemon is not exited normally (may be due to RMI leftovers), it's forced to exit
- timer.schedule(daemonOptions.forceShutdownTimeoutMilliseconds) {
+ val _ = timer.schedule(daemonOptions.forceShutdownTimeoutMilliseconds) {
cancel()
log.info("force JVM shutdown")
exitProcess(0)
@@ -217,4 +217,4 @@
})
Pair(compilerService, port)
}
-}
\ No newline at end of file
+}
diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/LazyClasspathWatcher.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/LazyClasspathWatcher.kt
index 165d3b1..e887aa7 100644
--- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/LazyClasspathWatcher.kt
+++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/LazyClasspathWatcher.kt
@@ -56,7 +56,7 @@
init {
// locking before entering thread in order to avoid racing with isChanged
fileIdsLock.acquire()
- thread(isDaemon = true, start = true) {
+ val _ = thread(isDaemon = true, start = true) {
try {
fileIds = classpath
.map(::File)
@@ -125,4 +125,3 @@
}
return md.digest()
}
-
diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierChecker.kt
index 88d4455..13080ca 100644
--- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierChecker.kt
+++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierChecker.kt
@@ -144,7 +144,7 @@
}
if (checkModifier(FirErrors.DEPRECATED_MODIFIER_FOR_TARGET)) {
- checkModifier(FirErrors.REDUNDANT_MODIFIER_FOR_TARGET)
+ val _ = checkModifier(FirErrors.REDUNDANT_MODIFIER_FOR_TARGET)
}
return true
diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirUnusedReturnValueChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirUnusedReturnValueChecker.kt
index 528b9f0..6c96da4 100644
--- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirUnusedReturnValueChecker.kt
+++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirUnusedReturnValueChecker.kt
@@ -165,6 +165,7 @@
"LinkedHashSet",
"HashMap",
"LinkedHashMap",
+ "ArrayDeque"
)
) return
nonIgnorableCollectionMethod(
diff --git a/compiler/fir/fir-jvm/src/org/jetbrains/kotlin/fir/java/scopes/JavaScopeUtils.kt b/compiler/fir/fir-jvm/src/org/jetbrains/kotlin/fir/java/scopes/JavaScopeUtils.kt
index b3c1fdf..a6c8eaa 100644
--- a/compiler/fir/fir-jvm/src/org/jetbrains/kotlin/fir/java/scopes/JavaScopeUtils.kt
+++ b/compiler/fir/fir-jvm/src/org/jetbrains/kotlin/fir/java/scopes/JavaScopeUtils.kt
@@ -161,7 +161,7 @@
noinline predicate: (T) -> Boolean,
): T? {
var result: T? = null
- containingScope.processFunction(this) { symbol ->
+ val _ = containingScope.processFunction(this) { symbol ->
if (predicate(symbol)) {
result = symbol
ProcessorAction.STOP
diff --git a/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt b/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt
index e864d87..4770af1 100644
--- a/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt
+++ b/compiler/fir/fir-serialization/src/org/jetbrains/kotlin/fir/serialization/FirElementSerializer.kt
@@ -1607,7 +1607,7 @@
this.pluginId = stringTable.getStringIndex(pluginId)
this.data = ByteString.copyFrom(data)
}
- addCompilerPluginData(pluginData)
+ val _ = addCompilerPluginData(pluginData)
}
}
}
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOverrideUtils.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOverrideUtils.kt
index ceef54c..0a68e84 100644
--- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOverrideUtils.kt
+++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOverrideUtils.kt
@@ -55,7 +55,7 @@
var result = false
- fScope.processAllOverridden(fMember) { overridden ->
+ val _ = fScope.processAllOverridden(fMember) { overridden ->
if (overridden == gMember) {
result = true
ProcessorAction.STOP
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScopeContext.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScopeContext.kt
index 82ab104..661d6c4 100644
--- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScopeContext.kt
+++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScopeContext.kt
@@ -331,7 +331,7 @@
return
}
- scope.processDirectOverridden(symbol) { overridden, baseScope ->
+ val _ = scope.processDirectOverridden(symbol) { overridden, baseScope ->
collectRealOverridden(overridden, baseScope, result, visited, processDirectOverridden)
ProcessorAction.NEXT
}
diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirDeclarationBuilder.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirDeclarationBuilder.kt
index 7b8be0a..9936710 100644
--- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirDeclarationBuilder.kt
+++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirDeclarationBuilder.kt
@@ -750,7 +750,7 @@
}
}
- superTypeRefs.ifEmpty {
+ val _ = superTypeRefs.ifEmpty {
superTypeRefs += implicitAnyType
delegatedSuperTypeRef = implicitAnyType
}
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt
index 610a346..9ed4dc6 100644
--- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt
+++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt
@@ -706,7 +706,7 @@
}
for ((ctor, graph) in secondaryConstructors) {
- ctor.computeDelegationLevel()
+ val _ = ctor.computeDelegationLevel()
val delegatesTo = constructorDelegation[ctor]
val delegatedNodeRange = secondaryConstructors[delegatesTo]?.let {
// constructor(A) : this(B) <-- class enter -> [constructor(A) enter -> B -> constructor(B) -> rest of constructor(A)]
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt
index 72b82cf..7c3ce93 100644
--- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt
+++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt
@@ -260,7 +260,7 @@
private fun setAccessorTypesByPropertyType(property: FirProperty) {
property.getter?.replaceReturnTypeRef(property.returnTypeRef)
- property.setter?.valueParameters?.map { it.replaceReturnTypeRef(property.returnTypeRef) }
+ property.setter?.valueParameters?.forEach { it.replaceReturnTypeRef(property.returnTypeRef) }
}
override fun transformField(field: FirField, data: Any?): FirField = whileAnalysing(session, field) {
diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/FirLookupTrackerComponent.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/FirLookupTrackerComponent.kt
index d71c576..5dfb1fd 100644
--- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/FirLookupTrackerComponent.kt
+++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/FirLookupTrackerComponent.kt
@@ -86,7 +86,7 @@
fun FirLookupTrackerComponent.recordUserTypeRefLookup(typeRef: FirUserTypeRef, inScopes: Iterable<String>, fileSource: KtSourceElement?) {
inScopes.forEach { scope ->
- typeRef.qualifier.fold(FqName(scope)) { result, suffix ->
+ val _ = typeRef.qualifier.fold(FqName(scope)) { result, suffix ->
recordLookup(suffix.name.asString(), result.asString(), typeRef.source, fileSource)
result.child(suffix.name)
}
diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirTypeScope.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirTypeScope.kt
index 5526c5d..240d1c4 100644
--- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirTypeScope.kt
+++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirTypeScope.kt
@@ -108,7 +108,7 @@
noinline predicate: (S) -> Boolean,
): Boolean {
var result = false
- processOverridden(symbol) {
+ val _ = processOverridden(symbol) {
if (predicate(it)) {
result = true
return@processOverridden ProcessorAction.STOP
diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/InterfaceDefaultMethodCallChecker.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/InterfaceDefaultMethodCallChecker.kt
index f506d72..bcc8364 100644
--- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/InterfaceDefaultMethodCallChecker.kt
+++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/InterfaceDefaultMethodCallChecker.kt
@@ -76,7 +76,7 @@
bindingContext: BindingContext
): CallableMemberDescriptor? {
val parents = generateSequence({ startExpression.parent }) { it.parent }
- parents.fold<PsiElement, PsiElement>(startExpression) { child, parent ->
+ val _ = parents.fold<PsiElement, PsiElement>(startExpression) { child, parent ->
if (parent is KtClassBody &&
descriptorToSearch == bindingContext.get(BindingContext.CLASS, parent.parent)
) {
diff --git a/compiler/frontend/cfg/src/org/jetbrains/kotlin/cfg/pseudocode/pseudocodeUtils.kt b/compiler/frontend/cfg/src/org/jetbrains/kotlin/cfg/pseudocode/pseudocodeUtils.kt
index 328820517..12b2c89 100644
--- a/compiler/frontend/cfg/src/org/jetbrains/kotlin/cfg/pseudocode/pseudocodeUtils.kt
+++ b/compiler/frontend/cfg/src/org/jetbrains/kotlin/cfg/pseudocode/pseudocodeUtils.kt
@@ -71,7 +71,7 @@
val pseudocode = value.createdAt?.owner ?: return AllTypes
val typePredicates = LinkedHashSet<TypePredicate?>()
- fun addSubtypesOf(kotlinType: KotlinType?) = typePredicates.add(kotlinType?.getSubtypesPredicate())
+ fun addSubtypesOf(kotlinType: KotlinType?): Unit { typePredicates.add(kotlinType?.getSubtypesPredicate()) }
fun addByExplicitReceiver(resolvedCall: ResolvedCall<*>?) {
val receiverValue = (resolvedCall ?: return).getExplicitReceiverValue()
@@ -147,7 +147,7 @@
element.getStrictParentOfType<KtWhileExpression>()?.condition -> addSubtypesOf(builtIns.booleanType)
is KtProperty -> {
val propertyDescriptor = bindingContext[BindingContext.DECLARATION_TO_DESCRIPTOR, element] as? PropertyDescriptor
- propertyDescriptor?.accessors?.map {
+ val _ = propertyDescriptor?.accessors?.map {
addByExplicitReceiver(bindingContext[BindingContext.DELEGATED_PROPERTY_RESOLVED_CALL, it])
}
}
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/contracts/ContextInfoToDataFlowInfo.kt b/compiler/frontend/src/org/jetbrains/kotlin/contracts/ContextInfoToDataFlowInfo.kt
index 12426e8..d83202e 100644
--- a/compiler/frontend/src/org/jetbrains/kotlin/contracts/ContextInfoToDataFlowInfo.kt
+++ b/compiler/frontend/src/org/jetbrains/kotlin/contracts/ContextInfoToDataFlowInfo.kt
@@ -35,7 +35,6 @@
if (rightDfv != null) {
resultingDataFlowInfo = resultingDataFlowInfo.equate(leftDfv, rightDfv, false, languageVersionSettings)
}
- IntArray(42) { it }
}
extractDataFlowStatements(notEqualValues, builtIns) { leftDfv, rightValue ->
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/QualifiedExpressionResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/QualifiedExpressionResolver.kt
index da0dec3..b65cb2b 100644
--- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/QualifiedExpressionResolver.kt
+++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/QualifiedExpressionResolver.kt
@@ -416,7 +416,7 @@
if (addQualifierPart(expression)) break
if (expression !is KtQualifiedExpression) break
- addQualifierPart(expression.selectorExpression)
+ val _ = addQualifierPart(expression.selectorExpression)
expression = expression.receiverExpression
}
@@ -709,7 +709,7 @@
trace: BindingTrace,
position: QualifierPosition
) {
- path.foldRight(packageView) { qualifierPart, currentView ->
+ val _ = path.foldRight(packageView) { qualifierPart, currentView ->
storeResult(trace, qualifierPart.expression, currentView, shouldBeVisibleFrom = null, position = position)
currentView.containingDeclaration
?: error(
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/ImplicitNothingAsTypeParameterCallChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/ImplicitNothingAsTypeParameterCallChecker.kt
index 30716dc..84d9372 100644
--- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/ImplicitNothingAsTypeParameterCallChecker.kt
+++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/ImplicitNothingAsTypeParameterCallChecker.kt
@@ -192,6 +192,6 @@
}
override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) {
- checkByReturnPositionWithoutExpected(resolvedCall, reportOn, context) || checkAgainstNotNothingExpectedType(resolvedCall, context)
+ val _ = checkByReturnPositionWithoutExpected(resolvedCall, reportOn, context) || checkAgainstNotNothingExpectedType(resolvedCall, context)
}
}
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt
index 91796ee..79cab5a 100644
--- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt
+++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt
@@ -416,16 +416,16 @@
)
// Returns true if fqName resolves to a valid opt-in requirement marker.
- fun checkAnnotation(fqName: String): Boolean {
+ fun checkAnnotation(fqName: String) {
val descriptor = module.resolveClassByFqName(FqName(fqName), NoLookupLocation.FOR_NON_TRACKED_SCOPE)
if (descriptor == null) {
reportWarning("Opt-in requirement marker $fqName is unresolved. Please make sure it's present in the module dependencies")
- return false
+ return
}
if (descriptor.loadOptInForMarkerAnnotation() == null) {
reportWarning("Class $fqName is not an opt-in requirement marker")
- return false
+ return
}
for (deprecation in deprecationResolver.getDeprecations(descriptor)) {
@@ -435,7 +435,7 @@
}
report("Opt-in requirement marker $fqName is deprecated" + deprecation.message?.let { ". $it" }.orEmpty())
}
- return true
+ return
}
languageVersionSettings.getFlag(AnalysisFlags.optIn).forEach { fqName ->
diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt
index 82d6e36..5701592 100644
--- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt
+++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt
@@ -319,7 +319,7 @@
outputDirs.toSet().forEach {
when {
it.isDirectory -> it.deleteDirectoryContents()
- it.isFile -> "Expected a directory but found a regular file: ${it.path}"
+ it.isFile -> error("Expected a directory but found a regular file: ${it.path}")
else -> it.createDirectory()
}
}
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/Lower.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/Lower.kt
index 91be91e..9f36476 100644
--- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/Lower.kt
+++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/Lower.kt
@@ -258,7 +258,7 @@
val visitor = this
- fun IrDeclaration.replaceInContainer(container: MutableList<in IrDeclaration>, result: List<IrDeclaration>): Boolean {
+ fun IrDeclaration.replaceInContainer(container: MutableList<in IrDeclaration>, result: List<IrDeclaration>) {
var index = container.indexOf(this)
if (index == -1) {
index = container.indexOf(declaration)
@@ -266,7 +266,6 @@
container.removeAt(index)
--index
}
- return container.addAll(index + 1, result)
}
fun IrDeclaration.transform() {
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/FinallyBlocksLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/FinallyBlocksLowering.kt
index 4d9a649..6854d0d 100644
--- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/FinallyBlocksLowering.kt
+++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/FinallyBlocksLowering.kt
@@ -179,7 +179,6 @@
val currentTryScope = tryScopes[index]
currentTryScope.jumps.getOrPut(jump) {
val type = (jump as? Return)?.target?.owner?.returnType(context) ?: value.type
- jump.toString()
val symbol = IrReturnableBlockSymbolImpl()
with(currentTryScope) {
irBuilder.run {
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/InlineCallCycleCheckerLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/InlineCallCycleCheckerLowering.kt
index 9c81f0c..cb6f496 100644
--- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/InlineCallCycleCheckerLowering.kt
+++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/InlineCallCycleCheckerLowering.kt
@@ -54,11 +54,11 @@
val completed = mutableSetOf<CallNode>()
val inlineCallsStack = mutableListOf<CallEdge>()
- fun reportInlineCallCycle(caller: IrFunction, callee: CallEdge) = callee.call?.let { call ->
+ fun reportInlineCallCycle(caller: IrFunction, callee: CallEdge): Unit { callee.call?.let { call ->
callsInInlineCycle.add(call)
diagnosticReporter.at(call, caller.file).report(CommonBackendErrors.INLINE_CALL_CYCLE, callee.callNode.function)
- }
+ } }
fun CallNode.dfs(call: IrCall?) {
if (visited.contains(this)) {
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/IdSignatureSource.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/IdSignatureSource.kt
index cd02408..2a746ef 100644
--- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/IdSignatureSource.kt
+++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/IdSignatureSource.kt
@@ -83,7 +83,7 @@
fun addNestedDeclarations(irClass: IrClass) {
for (decl in irClass.declarations) {
when (decl) {
- is IrSimpleFunction -> addSymbol(decl)
+ is IrSimpleFunction -> { val _ = addSymbol(decl) }
is IrProperty -> {
decl.getter?.let(::addSymbol)
decl.setter?.let(::addSymbol)
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/BlockDecomposerLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/BlockDecomposerLowering.kt
index 676871b..b25fe3e 100644
--- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/BlockDecomposerLowering.kt
+++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/BlockDecomposerLowering.kt
@@ -419,7 +419,7 @@
val block = IrBlockImpl(expression.startOffset, expression.endOffset, unitType, expression.origin)
// TODO: consider decomposing only when it is really required
- results.foldIndexed(block) { i, appendBlock, (cond, res, orig) ->
+ val _ = results.foldIndexed(block) { i, appendBlock, (cond, res, orig) ->
val condStatements = destructureComposite(cond)
val condValue = condStatements.last() as IrExpression
diff --git a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.kt b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.kt
index 28adc25..8ce21c6 100644
--- a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.kt
+++ b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.kt
@@ -245,7 +245,7 @@
private fun ArrayList<ExpressionToLabel>.removeUnreachableLabels(cases: List<ValueToLabel>) {
val reachableLabels = HashSet(cases.map { it.label })
- removeIf { it.label !in reachableLabels }
+ val _ = removeIf { it.label !in reachableLabels }
}
abstract inner class Switch(
diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmMultiFieldValueClassLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmMultiFieldValueClassLowering.kt
index 293bd26..84e3c51 100644
--- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmMultiFieldValueClassLowering.kt
+++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmMultiFieldValueClassLowering.kt
@@ -1132,7 +1132,7 @@
}
return false
}
- recur(block)
+ val _ = recur(block)
return resultVariables.map { irGet(it) } + standaloneExpressions.asReversed()
}
diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/MarkNecessaryInlinedClassesAsRegeneratedLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/MarkNecessaryInlinedClassesAsRegeneratedLowering.kt
index 61237d7..c883daa 100644
--- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/MarkNecessaryInlinedClassesAsRegeneratedLowering.kt
+++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/MarkNecessaryInlinedClassesAsRegeneratedLowering.kt
@@ -177,8 +177,8 @@
inlinableParameters.addAll(additionalInlinableParameters)
reifiedArguments.addAll(additionalTypeArguments)
super.visitContainerExpression(inlinedBlock)
- inlinableParameters.dropLast(additionalInlinableParameters.size)
- reifiedArguments.dropLast(additionalTypeArguments.size)
+ inlinableParameters.removeAll(additionalInlinableParameters)
+ reifiedArguments.removeAll(additionalTypeArguments)
}
})
return classesToRegenerate
diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/ToArrayLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/ToArrayLowering.kt
index 8da185a..cebe4de 100644
--- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/ToArrayLowering.kt
+++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/ToArrayLowering.kt
@@ -130,7 +130,7 @@
// If existing `toArray` is internal, create a public bridge method
// to preserve binary compatibility with code generated by the old back-end.
// NB This will preserve existing custom `toArray` signature.
- fallback(ToArrayBridge(existing))
+ val _ = fallback(ToArrayBridge(existing))
} else {
existing.visibility = DescriptorVisibilities.PUBLIC
}
@@ -140,7 +140,7 @@
// There's a Kotlin class up the hierarchy that should already have `toArray`.
return
}
- fallback(null)
+ val _ = fallback(null)
}
}
diff --git a/compiler/ir/ir.actualization/src/main/kotlin/org/jetbrains/kotlin/backend/common/actualizer/IrActualizer.kt b/compiler/ir/ir.actualization/src/main/kotlin/org/jetbrains/kotlin/backend/common/actualizer/IrActualizer.kt
index 8a4586a..ea80fa6 100644
--- a/compiler/ir/ir.actualization/src/main/kotlin/org/jetbrains/kotlin/backend/common/actualizer/IrActualizer.kt
+++ b/compiler/ir/ir.actualization/src/main/kotlin/org/jetbrains/kotlin/backend/common/actualizer/IrActualizer.kt
@@ -158,4 +158,3 @@
mainFragment.files.addAll(newFiles)
}
}
-
diff --git a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrInterpreter.kt b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrInterpreter.kt
index 21a8eba..9c4cc1c 100644
--- a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrInterpreter.kt
+++ b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrInterpreter.kt
@@ -69,7 +69,7 @@
internal fun withNewCallStack(call: IrCall, init: IrInterpreter.() -> Any?): State {
return with(IrInterpreter(environment.copyWithNewCallStack(), bodyMap)) {
callStack.newFrame(call.symbol.owner)
- init()
+ val _ = init()
while (!callStack.hasNoInstructions()) {
callStack.popInstruction().handle()
diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ExternalDependenciesGenerator.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ExternalDependenciesGenerator.kt
index 7429eb2..4977a6a 100644
--- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ExternalDependenciesGenerator.kt
+++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ExternalDependenciesGenerator.kt
@@ -36,7 +36,7 @@
for (symbol in unbound) {
// Symbol could get bound as a side effect of deserializing other symbols.
if (!symbol.isBound) {
- irProviders.firstNotNullOfOrNull { provider -> provider.getDeclaration(symbol) }
+ val _ = irProviders.firstNotNullOfOrNull { provider -> provider.getDeclaration(symbol) }
}
}
// We wait for the unbound to stabilize on fake overrides.
diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ScopedTypeParametersResolver.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ScopedTypeParametersResolver.kt
index 41528ad..2e831d2 100644
--- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ScopedTypeParametersResolver.kt
+++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ScopedTypeParametersResolver.kt
@@ -9,7 +9,6 @@
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
-import java.util.*
interface TypeParametersResolver {
fun enterTypeParameterScope(typeParametersContainer: IrTypeParametersContainer)
@@ -44,4 +43,4 @@
}
return null
}
-}
\ No newline at end of file
+}
diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageErrorMessages.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageErrorMessages.kt
index 9ea8c1c..4ad7217 100644
--- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageErrorMessages.kt
+++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageErrorMessages.kt
@@ -308,6 +308,7 @@
}
}
+@Suppress("RETURN_VALUE_NOT_USED")
private fun Appendable.unusableClassifier(
cause: Unusable,
rendering: CauseRendering,
diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/BasicIrModuleDeserializer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/BasicIrModuleDeserializer.kt
index 9da38b5..dfd1dff 100644
--- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/BasicIrModuleDeserializer.kt
+++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/BasicIrModuleDeserializer.kt
@@ -121,7 +121,7 @@
val topLevelDeclarations = fileDeserializationState.fileDeserializer.reversedSignatureIndex.keys
topLevelDeclarations.forEach {
- moduleReversedFileIndex.putIfAbsent(it, fileDeserializationState) // TODO Why not simple put?
+ val _ = moduleReversedFileIndex.putIfAbsent(it, fileDeserializationState) // TODO Why not simple put?
}
if (fileStrategy.theWholeWorld) {
@@ -230,4 +230,4 @@
val codedInputStream = CodedInputStream.newInstance(this)
codedInputStream.setRecursionLimit(65535) // The default 64 is blatantly not enough for IR.
return codedInputStream
- }
\ No newline at end of file
+ }
diff --git a/compiler/javac-wrapper/src/org/jetbrains/kotlin/javac/resolve/ClassifierResolver.kt b/compiler/javac-wrapper/src/org/jetbrains/kotlin/javac/resolve/ClassifierResolver.kt
index 00ad920..ed1de42 100644
--- a/compiler/javac-wrapper/src/org/jetbrains/kotlin/javac/resolve/ClassifierResolver.kt
+++ b/compiler/javac-wrapper/src/org/jetbrains/kotlin/javac/resolve/ClassifierResolver.kt
@@ -209,7 +209,7 @@
val imports = imports(name).toSet().takeIf { it.isNotEmpty() }
?: return parent.findClass(name, pathSegments)
- imports.singleOrNull() ?: return null
+ val _ = imports.singleOrNull() ?: return null
return helper.findImport(imports.first().split("."))
?.let { javaClass -> helper.getJavaClassFromPathSegments(javaClass, pathSegments) }
@@ -248,4 +248,4 @@
}
-fun classId(packageName: String = "", className: String) = ClassId(FqName(packageName), Name.identifier(className))
\ No newline at end of file
+fun classId(packageName: String = "", className: String) = ClassId(FqName(packageName), Name.identifier(className))
diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/ultraLightMethods.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/ultraLightMethods.kt
index 0e3ba6d..144d1f4 100644
--- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/ultraLightMethods.kt
+++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/ultraLightMethods.kt
@@ -331,7 +331,7 @@
//We should force computations on all lazy delegates to release descriptor on the end of ctor call
with(lazyInitializers) {
- forEach { it.value }
+ forEach { val _ = it.value }
clear()
}
}
diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/ultraLightParameters.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/ultraLightParameters.kt
index 873cba0..4ada042 100644
--- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/ultraLightParameters.kt
+++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/ultraLightParameters.kt
@@ -313,7 +313,7 @@
init {
//We should force computations on all lazy delegates to release descriptor on the end of ctor call
with(lazyInitializers) {
- forEach { it.value }
+ forEach { val _ = it.value }
clear()
}
}
diff --git a/compiler/resolution/src/org/jetbrains/kotlin/contracts/model/MutableContextInfo.kt b/compiler/resolution/src/org/jetbrains/kotlin/contracts/model/MutableContextInfo.kt
index 562651f..a9515b7 100644
--- a/compiler/resolution/src/org/jetbrains/kotlin/contracts/model/MutableContextInfo.kt
+++ b/compiler/resolution/src/org/jetbrains/kotlin/contracts/model/MutableContextInfo.kt
@@ -134,4 +134,4 @@
this.toString()
}
-}
\ No newline at end of file
+}
diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerResolver.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerResolver.kt
index 518f475..08fcea3 100644
--- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerResolver.kt
+++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerResolver.kt
@@ -302,12 +302,12 @@
}
if (implicitScopeTower.implicitsResolutionFilter === ImplicitsExtensionsResolutionFilter.Default) {
- processScopes(implicitScopeTower.lexicalScope.parentsWithSelf) { true }
+ val _ = processScopes(implicitScopeTower.lexicalScope.parentsWithSelf) { true }
} else {
val scopeInfos = implicitScopeTower.allScopesWithImplicitsResolutionInfo()
val scopeToResolveExtensionsForImplicitReceiverMap =
scopeInfos.map { it.scope to it.resolveExtensionsForImplicitReceiver }.toMap()
- processScopes(scopeInfos.map { it.scope }) { scopeToResolveExtensionsForImplicitReceiverMap[it] ?: false }
+ val _ = processScopes(scopeInfos.map { it.scope }) { scopeToResolveExtensionsForImplicitReceiverMap[it] ?: false }
}
recordLookups()
diff --git a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/backend/handlers/DebugRunner.kt b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/backend/handlers/DebugRunner.kt
index bba8989..5dc0a9e 100644
--- a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/backend/handlers/DebugRunner.kt
+++ b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/backend/handlers/DebugRunner.kt
@@ -71,6 +71,7 @@
}
// Debug event loop to step through a test program.
+ @Suppress("RETURN_VALUE_NOT_USED")
private fun runDebugEventLoop(virtualMachine: VirtualMachine) {
val manager = virtualMachine.eventRequestManager()
val loggedItems = ArrayList<SteppingTestLoggedData>()
diff --git a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/services/configuration/JvmForeignAnnotationsConfigurator.kt b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/services/configuration/JvmForeignAnnotationsConfigurator.kt
index 891a214..08de5f7 100644
--- a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/services/configuration/JvmForeignAnnotationsConfigurator.kt
+++ b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/services/configuration/JvmForeignAnnotationsConfigurator.kt
@@ -86,6 +86,7 @@
)
}
+ @Suppress("RETURN_VALUE_NOT_USED")
override fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule) {
val registeredDirectives = module.directives
if (ENABLE_FOREIGN_ANNOTATIONS !in registeredDirectives) return
@@ -162,7 +163,7 @@
private fun createJsr305Jar(configuration: CompilerConfiguration): File {
val jsr305FilesDir = createTempDirectory().toFile().also {
- File(JavaForeignAnnotationType.Jsr305.path).copyRecursively(it)
+ val _ = File(JavaForeignAnnotationType.Jsr305.path).copyRecursively(it)
}
return MockLibraryUtil.compileJavaFilesLibraryToJar(
diff --git a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/utils/SteppingTestUtils.kt b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/utils/SteppingTestUtils.kt
index 54eee84..a569fbd 100644
--- a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/utils/SteppingTestUtils.kt
+++ b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/utils/SteppingTestUtils.kt
@@ -112,7 +112,9 @@
for (line in lineIterator) {
if (line.startsWith(EXPECTATIONS_MARKER)) {
// Rewind the iterator to the first '// EXPECTATIONS' line
- if (lineIterator.hasPrevious()) lineIterator.previous()
+ if (lineIterator.hasPrevious()) {
+ val _ = lineIterator.previous()
+ }
break
}
actual.add(line)
diff --git a/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/AbstractAnnotationTypeQualifierResolver.kt b/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/AbstractAnnotationTypeQualifierResolver.kt
index 537bf03..52463b9 100644
--- a/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/AbstractAnnotationTypeQualifierResolver.kt
+++ b/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/AbstractAnnotationTypeQualifierResolver.kt
@@ -239,7 +239,7 @@
private companion object {
val JAVA_APPLICABILITY_TYPES = mutableMapOf<String, AnnotationQualifierApplicabilityType>().apply {
for (type in AnnotationQualifierApplicabilityType.values()) {
- getOrPut(type.javaTarget) { type }
+ putIfAbsent(type.javaTarget, type)
}
}
}
diff --git a/core/compiler.common/src/org/jetbrains/kotlin/util/AttributeArrayOwner.kt b/core/compiler.common/src/org/jetbrains/kotlin/util/AttributeArrayOwner.kt
index f5d0eda..e225edd 100644
--- a/core/compiler.common/src/org/jetbrains/kotlin/util/AttributeArrayOwner.kt
+++ b/core/compiler.common/src/org/jetbrains/kotlin/util/AttributeArrayOwner.kt
@@ -73,7 +73,7 @@
val content = buildString {
val services = typeRegistry.allValuesThreadUnsafeForRendering()
appendLine("[")
- map.mapIndexed { index, value ->
+ map.forEachIndexed { index, value ->
val service = services.entries.firstOrNull { it.value == index }
appendLine(" $service[$index]: $value")
}
diff --git a/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor.kt b/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor.kt
index 1018449..e4c9250 100644
--- a/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor.kt
+++ b/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor.kt
@@ -51,7 +51,7 @@
))
}
- (1..arity).map { i ->
+ (1..arity).forEach { i ->
typeParameter(Variance.IN_VARIANCE, "P$i")
}
diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/checker/utils.kt b/core/descriptors/src/org/jetbrains/kotlin/types/checker/utils.kt
index 33fa686..95e60cc 100644
--- a/core/descriptors/src/org/jetbrains/kotlin/types/checker/utils.kt
+++ b/core/descriptors/src/org/jetbrains/kotlin/types/checker/utils.kt
@@ -87,7 +87,7 @@
private fun KotlinType.approximate() = approximateCapturedTypes(this).upper
private fun TypeConstructor.debugInfo() = buildString {
- operator fun String.unaryPlus() = appendLine(this)
+ operator fun String.unaryPlus(): Unit { appendLine(this) }
+ "type: ${this@debugInfo}"
+ "hashCode: ${this@debugInfo.hashCode()}"
diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt
index 2750647..1924273 100644
--- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt
+++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt
@@ -243,7 +243,7 @@
private fun Map<Name, Collection<AbstractMessageLite>>.packToByteArray(): Map<Name, ByteArray> =
mapValues { entry ->
val byteArrayOutputStream = ByteArrayOutputStream()
- entry.value.map { proto -> proto.writeDelimitedTo(byteArrayOutputStream) }
+ entry.value.forEach { proto -> proto.writeDelimitedTo(byteArrayOutputStream) }
byteArrayOutputStream.toByteArray()
}
diff --git a/gradle.properties b/gradle.properties
index 51837cd..b00bccd 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -140,3 +140,5 @@
# - All from previous.
# - Dump IR after each phase.
#fd.kotlin.wasm.debugMode=debug
+
+org.gradle.dependency.verification=lenient
diff --git a/libraries/stdlib/jvm/src/kotlin/io/files/Utils.kt b/libraries/stdlib/jvm/src/kotlin/io/files/Utils.kt
index 9d44d0e..c30f32c 100644
--- a/libraries/stdlib/jvm/src/kotlin/io/files/Utils.kt
+++ b/libraries/stdlib/jvm/src/kotlin/io/files/Utils.kt
@@ -286,6 +286,7 @@
* @param overwrite `true` if it is allowed to overwrite existing destination files and directories.
* @return `false` if the copying was terminated, `true` otherwise.
*/
+@IgnorableReturnValue
public fun File.copyRecursively(
target: File,
overwrite: Boolean = false,
@@ -345,6 +346,7 @@
*
* @return `true` if the file or directory is successfully deleted, `false` otherwise.
*/
+@IgnorableReturnValue
public fun File.deleteRecursively(): Boolean = walkBottomUp().fold(true, { res, it -> (it.delete() || !it.exists()) && res })
/**
diff --git a/libraries/stdlib/src/kotlin/collections/Maps.kt b/libraries/stdlib/src/kotlin/collections/Maps.kt
index f727ef8..ce1890c 100644
--- a/libraries/stdlib/src/kotlin/collections/Maps.kt
+++ b/libraries/stdlib/src/kotlin/collections/Maps.kt
@@ -379,6 +379,7 @@
*
* @sample samples.collections.Maps.Usage.getOrPut
*/
+@IgnorableReturnValue
public inline fun <K, V> MutableMap<K, V>.getOrPut(key: K, defaultValue: () -> V): V {
val value = get(key)
return if (value == null) {
diff --git a/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/Kotlinp.kt b/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/Kotlinp.kt
index bf52a78..988e24c 100644
--- a/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/Kotlinp.kt
+++ b/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/Kotlinp.kt
@@ -217,6 +217,7 @@
@OptIn(ExperimentalContracts::class)
private fun renderEffect(effect: KmEffect, printer: Printer) {
// If there are several arguments, only the first is taken, see ContractDeserializerImpl.deserializeSimpleEffect
+ @IgnorableReturnValue
fun Printer.appendMeaningfulConstructorArgument(effect: KmEffect): Printer {
effect.constructorArguments.firstOrNull()?.let { append(printEffectExpression(it)) }
return this
diff --git a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableTargetAnnotationsTransformer.kt b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableTargetAnnotationsTransformer.kt
index 322f103..d986c4e 100644
--- a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableTargetAnnotationsTransformer.kt
+++ b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableTargetAnnotationsTransformer.kt
@@ -601,7 +601,7 @@
function.annotations = updatedAnnotations(function.annotations, scheme)
} else {
function.annotations = updatedAnnotations(function.annotations, scheme.target)
- parameters().zip(scheme.parameters) { parameter, parameterScheme ->
+ val _ = parameters().zip(scheme.parameters) { parameter, parameterScheme ->
parameter.updateScheme(parameterScheme)
}
}
@@ -1043,4 +1043,4 @@
}
private fun IrFunction.hasOpenTypeParameters(): Boolean =
- parameters.any { it.type.isTypeParameter() }
\ No newline at end of file
+ parameters.any { it.type.isTypeParameter() }
diff --git a/plugins/kapt/kapt-compiler/src/org/jetbrains/kotlin/kapt/KaptPlugin.kt b/plugins/kapt/kapt-compiler/src/org/jetbrains/kotlin/kapt/KaptPlugin.kt
index 2197bfb..ec1c555 100644
--- a/plugins/kapt/kapt-compiler/src/org/jetbrains/kotlin/kapt/KaptPlugin.kt
+++ b/plugins/kapt/kapt-compiler/src/org/jetbrains/kotlin/kapt/KaptPlugin.kt
@@ -94,7 +94,7 @@
apply(keyValuePair[0], keyValuePair[1])
}
- @Suppress("DEPRECATION")
+ @Suppress("DEPRECATION", "RETURN_VALUE_NOT_USED")
when (option) {
SOURCE_OUTPUT_DIR_OPTION -> sourcesOutputDir = File(value)
CLASS_OUTPUT_DIR_OPTION -> classesOutputDir = File(value)
diff --git a/plugins/kotlinx-serialization/kotlinx-serialization.backend/src/org/jetbrains/kotlinx/serialization/compiler/backend/ir/BaseIrGenerator.kt b/plugins/kotlinx-serialization/kotlinx-serialization.backend/src/org/jetbrains/kotlinx/serialization/compiler/backend/ir/BaseIrGenerator.kt
index d975223..5c7a3f1 100644
--- a/plugins/kotlinx-serialization/kotlinx-serialization.backend/src/org/jetbrains/kotlinx/serialization/compiler/backend/ir/BaseIrGenerator.kt
+++ b/plugins/kotlinx-serialization/kotlinx-serialization.backend/src/org/jetbrains/kotlinx/serialization/compiler/backend/ir/BaseIrGenerator.kt
@@ -406,7 +406,7 @@
internal fun IrClass.addCachedChildSerializersProperty(cacheableSerializers: List<IrExpression?>): IrProperty? {
// if all child serializers are null (non-cacheable) we don't need to create a property
- cacheableSerializers.firstOrNull { it != null } ?: return null
+ val _ = cacheableSerializers.firstOrNull { it != null } ?: return null
val kSerializerType = kSerializerType(compilerContext.irBuiltIns.anyType)
val elementType = lazyType(kSerializerType)
diff --git a/plugins/lombok/lombok.common/src/org/jetbrains/kotlin/lombok/config/LombokConfig.kt b/plugins/lombok/lombok.common/src/org/jetbrains/kotlin/lombok/config/LombokConfig.kt
index 1eeca9a..534c3b3 100644
--- a/plugins/lombok/lombok.common/src/org/jetbrains/kotlin/lombok/config/LombokConfig.kt
+++ b/plugins/lombok/lombok.common/src/org/jetbrains/kotlin/lombok/config/LombokConfig.kt
@@ -77,11 +77,11 @@
}
fun plusValue(name: String, value: String) {
- state.merge(normalizeKey(name), listOf(value)) { a, b -> a + b }
+ val _ = state.merge(normalizeKey(name), listOf(value)) { a, b -> a + b }
}
fun minusValue(name: String, value: String) {
- state.merge(normalizeKey(name), listOf(value)) { a, b -> a - b }
+ val _ = state.merge(normalizeKey(name), listOf(value)) { a, b -> a - b }
}
fun build(): LombokConfig = LombokConfig(state)
@@ -89,5 +89,3 @@
//lombok config keys are case insensitive
private fun normalizeKey(key: String): String = key.lowercase()
-
-
diff --git a/plugins/parcelize/parcelize-compiler/parcelize.backend/src/org/jetbrains/kotlin/parcelize/irUtils.kt b/plugins/parcelize/parcelize-compiler/parcelize.backend/src/org/jetbrains/kotlin/parcelize/irUtils.kt
index 534b88c..8518b28 100644
--- a/plugins/parcelize/parcelize-compiler/parcelize.backend/src/org/jetbrains/kotlin/parcelize/irUtils.kt
+++ b/plugins/parcelize/parcelize-compiler/parcelize.backend/src/org/jetbrains/kotlin/parcelize/irUtils.kt
@@ -209,7 +209,7 @@
upperBoundOrNull() ?: builtIns.anyNType
fun IrClass.typeParameterMapping(instantiation: IrType): Map<IrTypeParameterSymbol, IrType> = buildMap {
- (instantiation as? IrSimpleType)?.arguments?.zip(typeParameters) { arg, parameter ->
+ val _ = (instantiation as? IrSimpleType)?.arguments?.zip(typeParameters) { arg, parameter ->
put(parameter.symbol, arg.upperBoundOrNull() ?: parameter.representativeUpperBound)
}
}
diff --git a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/extensions/ScriptingProcessSourcesBeforeCompilingExtension.kt b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/extensions/ScriptingProcessSourcesBeforeCompilingExtension.kt
index 81e552b..6f2997d 100644
--- a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/extensions/ScriptingProcessSourcesBeforeCompilingExtension.kt
+++ b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/extensions/ScriptingProcessSourcesBeforeCompilingExtension.kt
@@ -128,7 +128,7 @@
val symbol = currentScope!!.scope.scopeOwnerSymbol
val builder = DeclarationIrBuilder(context, symbol, expression.startOffset, expression.endOffset)
return builder.irExplain(expression, sourceFile) { variables ->
- variables.last()
+ val _ = variables.last()
}
}
}
@@ -176,4 +176,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/common-configuration.gradle.kts b/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/common-configuration.gradle.kts
index 38a8b28..0163c43 100644
--- a/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/common-configuration.gradle.kts
+++ b/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/common-configuration.gradle.kts
@@ -111,6 +111,7 @@
"-Xwhen-guards", // KT-13626
"-Xnon-local-break-continue", // KT-1436
"-Xcontext-parameters", // KT-72222
+ "-Xreturn-value-checker=check"
)
val kotlinLanguageVersion: String by rootProject.extra