Fix compiler warnings in compiler code
This commit is contained in:
+1
@@ -43,6 +43,7 @@ open class ContractDescription(
|
||||
ContractInterpretationDispatcher().convertContractDescriptorToFunctor(this)
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
fun getFunctor(usageModule: ModuleDescriptor): Functor? = computeFunctor.invoke()
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.resolve.calls.components.CreateFreshVariablesSubstit
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemOperation
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.FreshVariableNewTypeSubstitutor
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ArgumentConstraintPosition
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.LowerPriorityToPreserveCompatibility
|
||||
import org.jetbrains.kotlin.resolve.calls.model.*
|
||||
import org.jetbrains.kotlin.resolve.calls.tasks.ExplicitReceiverKind
|
||||
import org.jetbrains.kotlin.resolve.calls.tasks.ExplicitReceiverKind.DISPATCH_RECEIVER
|
||||
@@ -351,10 +350,11 @@ class CallableReferencesCandidateFactory(
|
||||
// If we've already mapped an argument to this value parameter, it'll always be a type mismatch.
|
||||
mappedArguments[valueParameter] = ResolvedCallArgument.SimpleArgument(fakeArgument)
|
||||
}
|
||||
|
||||
VarargMappingState.MAPPED_WITH_PLAIN_ARGS -> {
|
||||
mappedVarargElements.getOrPut(valueParameter) { ArrayList() }.add(fakeArgument)
|
||||
}
|
||||
VarargMappingState.UNMAPPED -> {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mappedArgument = substitutedParameter.type
|
||||
@@ -390,13 +390,13 @@ class CallableReferencesCandidateFactory(
|
||||
CoercionStrategy.NO_COERCION
|
||||
|
||||
val adaptedArguments =
|
||||
if (expectedType != null && ReflectionTypes.isBaseTypeForNumberedReferenceTypes(expectedType))
|
||||
if (ReflectionTypes.isBaseTypeForNumberedReferenceTypes(expectedType))
|
||||
emptyMap()
|
||||
else
|
||||
mappedArguments
|
||||
|
||||
val suspendConversionStrategy =
|
||||
if (!descriptor.isSuspend && expectedType?.isSuspendFunctionType == true) {
|
||||
if (!descriptor.isSuspend && expectedType.isSuspendFunctionType) {
|
||||
SuspendConversionStrategy.SUSPEND_CONVERSION
|
||||
} else {
|
||||
SuspendConversionStrategy.NO_CONVERSION
|
||||
|
||||
+2
-2
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
||||
import org.jetbrains.kotlin.resolve.calls.components.ClassicTypeSystemContextForCS
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilder
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintSystemImpl
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.SimpleConstraintSystemConstraintPosition
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.TypeVariableFromCallableDescriptor
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.substitute
|
||||
import org.jetbrains.kotlin.resolve.calls.results.SimpleConstraintSystem
|
||||
@@ -60,8 +61,7 @@ class SimpleConstraintSystemImpl(constraintInjector: ConstraintInjector, builtIn
|
||||
csBuilder.addSubtypeConstraint(
|
||||
subType,
|
||||
superType,
|
||||
@Suppress("DEPRECATION")
|
||||
org.jetbrains.kotlin.resolve.calls.inference.model.SimpleConstraintSystemConstraintPosition
|
||||
SimpleConstraintSystemConstraintPosition
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ class CoroutinePosition() : ConstraintPosition() {
|
||||
override fun toString(): String = "for coroutine call"
|
||||
}
|
||||
|
||||
@Deprecated("Should be used only in SimpleConstraintSystemImpl")
|
||||
// TODO: should be used only in SimpleConstraintSystemImpl
|
||||
object SimpleConstraintSystemConstraintPosition : ConstraintPosition()
|
||||
|
||||
abstract class ConstraintSystemCallDiagnostic(applicability: ResolutionCandidateApplicability) : KotlinCallDiagnostic(applicability) {
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ interface LambdaKotlinCallArgument : PostponableKotlinCallArgument {
|
||||
*/
|
||||
var hasBuilderInferenceAnnotation: Boolean
|
||||
get() = false
|
||||
set(value) {}
|
||||
set(@Suppress("UNUSED_PARAMETER") value) {}
|
||||
|
||||
/**
|
||||
* parametersTypes == null means, that there is no declared arguments
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ sealed class UnstableSmartCast(
|
||||
operator fun invoke(
|
||||
argument: ExpressionKotlinCallArgument,
|
||||
targetType: UnwrappedType,
|
||||
isReceiver: Boolean = false, // for reproducing OI behaviour
|
||||
@Suppress("UNUSED_PARAMETER") isReceiver: Boolean = false, // for reproducing OI behaviour
|
||||
): UnstableSmartCast {
|
||||
return UnstableSmartCastResolutionError(argument, targetType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user