Fix compiler warnings and some inspections
This commit is contained in:
+12
-10
@@ -323,17 +323,19 @@ fun configureDaemonJVMOptions(opts: DaemonJVMOptions,
|
|||||||
|
|
||||||
private val jvmAssertArgsRegex = "(es?a|ds?a|(enable|disable)(system)?assertions)(${'$'}|:)".toRegex()
|
private val jvmAssertArgsRegex = "(es?a|ds?a|(enable|disable)(system)?assertions)(${'$'}|:)".toRegex()
|
||||||
|
|
||||||
fun configureDaemonJVMOptions(vararg additionalParams: String,
|
fun configureDaemonJVMOptions(
|
||||||
inheritMemoryLimits: Boolean,
|
vararg additionalParams: String,
|
||||||
inheritOtherJvmOptions: Boolean,
|
inheritMemoryLimits: Boolean,
|
||||||
inheritAdditionalProperties: Boolean
|
inheritOtherJvmOptions: Boolean,
|
||||||
|
inheritAdditionalProperties: Boolean
|
||||||
): DaemonJVMOptions =
|
): DaemonJVMOptions =
|
||||||
configureDaemonJVMOptions(DaemonJVMOptions(),
|
configureDaemonJVMOptions(
|
||||||
additionalParams = additionalParams,
|
DaemonJVMOptions(),
|
||||||
inheritMemoryLimits = inheritMemoryLimits,
|
*additionalParams,
|
||||||
inheritOtherJvmOptions = inheritOtherJvmOptions,
|
inheritMemoryLimits = inheritMemoryLimits,
|
||||||
inheritAdditionalProperties = inheritAdditionalProperties)
|
inheritOtherJvmOptions = inheritOtherJvmOptions,
|
||||||
|
inheritAdditionalProperties = inheritAdditionalProperties,
|
||||||
|
)
|
||||||
|
|
||||||
fun configureDaemonOptions(opts: DaemonOptions): DaemonOptions {
|
fun configureDaemonOptions(opts: DaemonOptions): DaemonOptions {
|
||||||
System.getProperty(COMPILE_DAEMON_OPTIONS_PROPERTY)?.let {
|
System.getProperty(COMPILE_DAEMON_OPTIONS_PROPERTY)?.let {
|
||||||
|
|||||||
@@ -841,7 +841,7 @@ class HtmlFirDump internal constructor(private var linkResolver: FirLinkResolver
|
|||||||
is ConeClassErrorType -> error { +type.diagnostic.reason }
|
is ConeClassErrorType -> error { +type.diagnostic.reason }
|
||||||
is ConeClassLikeType -> return generate(type)
|
is ConeClassLikeType -> return generate(type)
|
||||||
is ConeTypeParameterType -> resolved {
|
is ConeTypeParameterType -> resolved {
|
||||||
symbolRef(type.lookupTag.toSymbol()) {
|
symbolRef(type.lookupTag.symbol) {
|
||||||
simpleName(type.lookupTag.name)
|
simpleName(type.lookupTag.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -345,7 +345,6 @@ fun Fir2IrComponents.createSafeCallConstruction(
|
|||||||
receiverVariable: IrVariable,
|
receiverVariable: IrVariable,
|
||||||
receiverVariableSymbol: IrValueSymbol,
|
receiverVariableSymbol: IrValueSymbol,
|
||||||
expressionOnNotNull: IrExpression,
|
expressionOnNotNull: IrExpression,
|
||||||
isReceiverNullable: Boolean
|
|
||||||
): IrExpression {
|
): IrExpression {
|
||||||
val startOffset = expressionOnNotNull.startOffset
|
val startOffset = expressionOnNotNull.startOffset
|
||||||
val endOffset = expressionOnNotNull.endOffset
|
val endOffset = expressionOnNotNull.endOffset
|
||||||
|
|||||||
@@ -343,14 +343,7 @@ class Fir2IrVisitor(
|
|||||||
|
|
||||||
return conversionScope.withSafeCallSubject(receiverVariable) {
|
return conversionScope.withSafeCallSubject(receiverVariable) {
|
||||||
val afterNotNullCheck = safeCallExpression.regularQualifiedAccess.accept(this, data) as IrExpression
|
val afterNotNullCheck = safeCallExpression.regularQualifiedAccess.accept(this, data) as IrExpression
|
||||||
|
components.createSafeCallConstruction(receiverVariable, variableSymbol, afterNotNullCheck)
|
||||||
val isReceiverNullable = with(components.session.typeContext) {
|
|
||||||
safeCallExpression.receiver.typeRef.coneType.isNullableType()
|
|
||||||
}
|
|
||||||
|
|
||||||
components.createSafeCallConstruction(
|
|
||||||
receiverVariable, variableSymbol, afterNotNullCheck, isReceiverNullable
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -169,7 +169,7 @@ internal class OperatorExpressionGenerator(
|
|||||||
|
|
||||||
unsafeIrCall.dispatchReceiver = IrGetValueImpl(startOffset, endOffset, receiverVariableSymbol)
|
unsafeIrCall.dispatchReceiver = IrGetValueImpl(startOffset, endOffset, receiverVariableSymbol)
|
||||||
|
|
||||||
components.createSafeCallConstruction(receiverVariable, receiverVariableSymbol, unsafeIrCall, isReceiverNullable = true)
|
components.createSafeCallConstruction(receiverVariable, receiverVariableSymbol, unsafeIrCall)
|
||||||
} else {
|
} else {
|
||||||
unsafeIrCall
|
unsafeIrCall
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ class FirAnnotationTypeQualifierResolver(private val session: FirSession, privat
|
|||||||
val annotationClassId = annotationCall.classId
|
val annotationClassId = annotationCall.classId
|
||||||
return BUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATION_IDS[annotationClassId]?.let { qualifierForDefaultingAnnotation ->
|
return BUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATION_IDS[annotationClassId]?.let { qualifierForDefaultingAnnotation ->
|
||||||
val state = resolveJsr305ReportLevel(annotationCall).takeIf { it != ReportLevel.IGNORE } ?: return null
|
val state = resolveJsr305ReportLevel(annotationCall).takeIf { it != ReportLevel.IGNORE } ?: return null
|
||||||
return qualifierForDefaultingAnnotation.copy(
|
qualifierForDefaultingAnnotation.copy(
|
||||||
nullabilityQualifier = qualifierForDefaultingAnnotation.nullabilityQualifier.copy(isForWarningOnly = state.isWarning)
|
nullabilityQualifier = qualifierForDefaultingAnnotation.nullabilityQualifier.copy(isForWarningOnly = state.isWarning)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import org.jetbrains.kotlin.fir.resolve.providers.FirSymbolProvider
|
|||||||
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
|
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
|
||||||
import org.jetbrains.kotlin.fir.symbols.ConeClassifierLookupTag
|
import org.jetbrains.kotlin.fir.symbols.ConeClassifierLookupTag
|
||||||
import org.jetbrains.kotlin.fir.symbols.ConeClassifierLookupTagWithFixedSymbol
|
import org.jetbrains.kotlin.fir.symbols.ConeClassifierLookupTagWithFixedSymbol
|
||||||
import org.jetbrains.kotlin.fir.symbols.ConeTypeParameterLookupTag
|
|
||||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||||
|
|
||||||
fun ConeClassifierLookupTag.toSymbol(useSiteSession: FirSession): FirClassifierSymbol<*>? =
|
fun ConeClassifierLookupTag.toSymbol(useSiteSession: FirSession): FirClassifierSymbol<*>? =
|
||||||
@@ -33,8 +32,6 @@ fun ConeClassLikeLookupTag.toSymbol(useSiteSession: FirSession): FirClassLikeSym
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun ConeTypeParameterLookupTag.toSymbol(): FirTypeParameterSymbol = this.symbol as FirTypeParameterSymbol
|
|
||||||
|
|
||||||
@OptIn(LookupTagInternals::class)
|
@OptIn(LookupTagInternals::class)
|
||||||
fun ConeClassLikeLookupTagImpl.bindSymbolToLookupTag(session: FirSession, symbol: FirClassLikeSymbol<*>?) {
|
fun ConeClassLikeLookupTagImpl.bindSymbolToLookupTag(session: FirSession, symbol: FirClassLikeSymbol<*>?) {
|
||||||
boundSymbol = OneElementWeakMap(session, symbol)
|
boundSymbol = OneElementWeakMap(session, symbol)
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ private fun ConeKotlinType.scope(useSiteSession: FirSession, scopeSession: Scope
|
|||||||
fir.scopeForClass(substitutorByMap(substitution), useSiteSession, scopeSession)
|
fir.scopeForClass(substitutorByMap(substitution), useSiteSession, scopeSession)
|
||||||
}
|
}
|
||||||
is ConeTypeParameterType -> {
|
is ConeTypeParameterType -> {
|
||||||
val symbol = lookupTag.toSymbol()
|
val symbol = lookupTag.symbol
|
||||||
scopeSession.getOrBuild(symbol, TYPE_PARAMETER_SCOPE_KEY) {
|
scopeSession.getOrBuild(symbol, TYPE_PARAMETER_SCOPE_KEY) {
|
||||||
val intersectionType = ConeTypeIntersector.intersectTypes(
|
val intersectionType = ConeTypeIntersector.intersectTypes(
|
||||||
useSiteSession.typeContext,
|
useSiteSession.typeContext,
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ private fun mapTypeAliasArguments(
|
|||||||
|
|
||||||
override fun substituteArgument(projection: ConeTypeProjection): ConeTypeProjection? {
|
override fun substituteArgument(projection: ConeTypeProjection): ConeTypeProjection? {
|
||||||
val type = (projection as? ConeKotlinTypeProjection)?.type ?: return null
|
val type = (projection as? ConeKotlinTypeProjection)?.type ?: return null
|
||||||
val symbol = (type as? ConeTypeParameterType)?.lookupTag?.toSymbol() ?: return super.substituteArgument(projection)
|
val symbol = (type as? ConeTypeParameterType)?.lookupTag?.symbol ?: return super.substituteArgument(projection)
|
||||||
val mappedProjection = typeAliasMap[symbol] ?: return super.substituteArgument(projection)
|
val mappedProjection = typeAliasMap[symbol] ?: return super.substituteArgument(projection)
|
||||||
val mappedType = (mappedProjection as? ConeKotlinTypeProjection)?.type ?: return mappedProjection
|
val mappedType = (mappedProjection as? ConeKotlinTypeProjection)?.type ?: return mappedProjection
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -17,7 +17,6 @@ import org.jetbrains.kotlin.fir.extensions.extensionService
|
|||||||
import org.jetbrains.kotlin.fir.extensions.predicateBasedProvider
|
import org.jetbrains.kotlin.fir.extensions.predicateBasedProvider
|
||||||
import org.jetbrains.kotlin.fir.extensions.supertypeGenerators
|
import org.jetbrains.kotlin.fir.extensions.supertypeGenerators
|
||||||
import org.jetbrains.kotlin.fir.resolve.*
|
import org.jetbrains.kotlin.fir.resolve.*
|
||||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
|
||||||
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.LocalClassesNavigationInfo
|
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.LocalClassesNavigationInfo
|
||||||
import org.jetbrains.kotlin.fir.scopes.FirCompositeScope
|
import org.jetbrains.kotlin.fir.scopes.FirCompositeScope
|
||||||
import org.jetbrains.kotlin.fir.scopes.FirScope
|
import org.jetbrains.kotlin.fir.scopes.FirScope
|
||||||
@@ -228,7 +227,7 @@ private class FirSupertypeResolverVisitor(
|
|||||||
|
|
||||||
// Local classes should be treated specially and supplied with localClassesNavigationInfo, normally
|
// Local classes should be treated specially and supplied with localClassesNavigationInfo, normally
|
||||||
// But it seems to be too strict to add an assertion here
|
// But it seems to be too strict to add an assertion here
|
||||||
val navigationInfo = localClassesNavigationInfo ?: return persistentListOf()
|
if (localClassesNavigationInfo == null) return persistentListOf()
|
||||||
|
|
||||||
val parent = localClassesNavigationInfo.parentForClass[classLikeDeclaration]
|
val parent = localClassesNavigationInfo.parentForClass[classLikeDeclaration]
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ fun AbstractFirBasedSymbol<*>.ensureResolved(
|
|||||||
requiredPhase: FirResolvePhase,
|
requiredPhase: FirResolvePhase,
|
||||||
// TODO: Currently, the parameter is unused but it's needed to guarantee that all call-sites are able to supply use-site session
|
// TODO: Currently, the parameter is unused but it's needed to guarantee that all call-sites are able to supply use-site session
|
||||||
// TODO: Decide which one session should be used and probably get rid of the parameter if use-site session is not needed
|
// TODO: Decide which one session should be used and probably get rid of the parameter if use-site session is not needed
|
||||||
useSiteSession: FirSession,
|
@Suppress("UNUSED_PARAMETER") useSiteSession: FirSession,
|
||||||
) {
|
) {
|
||||||
val fir = fir as FirDeclaration
|
val fir = fir as FirDeclaration
|
||||||
val availablePhase = fir.resolvePhase
|
val availablePhase = fir.resolvePhase
|
||||||
|
|||||||
-2
@@ -234,8 +234,6 @@ private class ReturnTypeCalculatorWithJump(
|
|||||||
|
|
||||||
private fun computeReturnTypeRef(declaration: FirCallableMemberDeclaration<*>): FirResolvedTypeRef {
|
private fun computeReturnTypeRef(declaration: FirCallableMemberDeclaration<*>): FirResolvedTypeRef {
|
||||||
val symbol = declaration.symbol
|
val symbol = declaration.symbol
|
||||||
val id = symbol.callableId
|
|
||||||
|
|
||||||
val provider = session.firProvider
|
val provider = session.firProvider
|
||||||
|
|
||||||
val (designation, outerBodyResolveContext) = if (declaration in designationMapForLocalClasses) {
|
val (designation, outerBodyResolveContext) = if (declaration in designationMapForLocalClasses) {
|
||||||
|
|||||||
+2
-8
@@ -108,8 +108,7 @@ object FirFakeOverrideGenerator {
|
|||||||
dispatchReceiverType = newDispatchReceiverType
|
dispatchReceiverType = newDispatchReceiverType
|
||||||
attributes = baseFunction.attributes.copy()
|
attributes = baseFunction.attributes.copy()
|
||||||
typeParameters += configureAnnotationsTypeParametersAndSignature(
|
typeParameters += configureAnnotationsTypeParametersAndSignature(
|
||||||
session, baseFunction, newParameterTypes,
|
baseFunction, newParameterTypes, newTypeParameters, newReceiverType, newReturnType, fakeOverrideSubstitution
|
||||||
newTypeParameters, newReceiverType, newReturnType, fakeOverrideSubstitution
|
|
||||||
).filterIsInstance<FirTypeParameter>()
|
).filterIsInstance<FirTypeParameter>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,7 +134,7 @@ object FirFakeOverrideGenerator {
|
|||||||
symbol = fakeOverrideSymbol
|
symbol = fakeOverrideSymbol
|
||||||
|
|
||||||
typeParameters += configureAnnotationsTypeParametersAndSignature(
|
typeParameters += configureAnnotationsTypeParametersAndSignature(
|
||||||
session, baseConstructor, newParameterTypes, newTypeParameters, newReceiverType = null, newReturnType, fakeOverrideSubstitution
|
baseConstructor, newParameterTypes, newTypeParameters, newReceiverType = null, newReturnType, fakeOverrideSubstitution
|
||||||
)
|
)
|
||||||
|
|
||||||
dispatchReceiverType = newDispatchReceiverType
|
dispatchReceiverType = newDispatchReceiverType
|
||||||
@@ -147,7 +146,6 @@ object FirFakeOverrideGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun FirFunctionBuilder.configureAnnotationsTypeParametersAndSignature(
|
private fun FirFunctionBuilder.configureAnnotationsTypeParametersAndSignature(
|
||||||
session: FirSession,
|
|
||||||
baseFunction: FirFunction<*>,
|
baseFunction: FirFunction<*>,
|
||||||
newParameterTypes: List<ConeKotlinType?>?,
|
newParameterTypes: List<ConeKotlinType?>?,
|
||||||
newTypeParameters: List<FirTypeParameterRef>?,
|
newTypeParameters: List<FirTypeParameterRef>?,
|
||||||
@@ -158,7 +156,6 @@ object FirFakeOverrideGenerator {
|
|||||||
return when {
|
return when {
|
||||||
baseFunction.typeParameters.isEmpty() -> {
|
baseFunction.typeParameters.isEmpty() -> {
|
||||||
configureAnnotationsAndSignature(
|
configureAnnotationsAndSignature(
|
||||||
session,
|
|
||||||
baseFunction,
|
baseFunction,
|
||||||
newParameterTypes,
|
newParameterTypes,
|
||||||
newReceiverType,
|
newReceiverType,
|
||||||
@@ -183,7 +180,6 @@ object FirFakeOverrideGenerator {
|
|||||||
else -> null to FakeOverrideSubstitution(substitutor, symbol)
|
else -> null to FakeOverrideSubstitution(substitutor, symbol)
|
||||||
}
|
}
|
||||||
configureAnnotationsAndSignature(
|
configureAnnotationsAndSignature(
|
||||||
session,
|
|
||||||
baseFunction,
|
baseFunction,
|
||||||
copiedParameterTypes,
|
copiedParameterTypes,
|
||||||
copiedReceiverType,
|
copiedReceiverType,
|
||||||
@@ -194,7 +190,6 @@ object FirFakeOverrideGenerator {
|
|||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
configureAnnotationsAndSignature(
|
configureAnnotationsAndSignature(
|
||||||
session,
|
|
||||||
baseFunction,
|
baseFunction,
|
||||||
newParameterTypes,
|
newParameterTypes,
|
||||||
newReceiverType,
|
newReceiverType,
|
||||||
@@ -207,7 +202,6 @@ object FirFakeOverrideGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun FirFunctionBuilder.configureAnnotationsAndSignature(
|
private fun FirFunctionBuilder.configureAnnotationsAndSignature(
|
||||||
session: FirSession,
|
|
||||||
baseFunction: FirFunction<*>,
|
baseFunction: FirFunction<*>,
|
||||||
newParameterTypes: List<ConeKotlinType?>?,
|
newParameterTypes: List<ConeKotlinType?>?,
|
||||||
newReceiverType: ConeKotlinType?,
|
newReceiverType: ConeKotlinType?,
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty
|
|||||||
}
|
}
|
||||||
|
|
||||||
val substitutor = substitutorByMap((0 until argumentsCount).map { index ->
|
val substitutor = substitutorByMap((0 until argumentsCount).map { index ->
|
||||||
(typeConstructor.getParameter(index) as ConeTypeParameterLookupTag).toSymbol() to (newArguments[index] as ConeKotlinType)
|
(typeConstructor.getParameter(index) as ConeTypeParameterLookupTag).symbol to (newArguments[index] as ConeKotlinType)
|
||||||
}.toMap())
|
}.toMap())
|
||||||
|
|
||||||
for (index in 0 until argumentsCount) {
|
for (index in 0 until argumentsCount) {
|
||||||
@@ -561,8 +561,8 @@ class ConeTypeCheckerContext(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun areEqualTypeConstructors(a: TypeConstructorMarker, b: TypeConstructorMarker): Boolean {
|
override fun areEqualTypeConstructors(c1: TypeConstructorMarker, c2: TypeConstructorMarker): Boolean {
|
||||||
return a == b
|
return c1 == c2
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun prepareType(type: KotlinTypeMarker): KotlinTypeMarker {
|
override fun prepareType(type: KotlinTypeMarker): KotlinTypeMarker {
|
||||||
|
|||||||
@@ -239,9 +239,11 @@ private class DelegatingPackageFragmentProvider<M : ModuleInfo>(
|
|||||||
) : PackageFragmentProviderOptimized {
|
) : PackageFragmentProviderOptimized {
|
||||||
private val syntheticFilePackages = moduleContent.syntheticFiles.map { it.packageFqName }.toSet()
|
private val syntheticFilePackages = moduleContent.syntheticFiles.map { it.packageFqName }.toSet()
|
||||||
|
|
||||||
|
@Suppress("OverridingDeprecatedMember")
|
||||||
override fun getPackageFragments(fqName: FqName): List<PackageFragmentDescriptor> {
|
override fun getPackageFragments(fqName: FqName): List<PackageFragmentDescriptor> {
|
||||||
if (certainlyDoesNotExist(fqName)) return emptyList()
|
if (certainlyDoesNotExist(fqName)) return emptyList()
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
return resolverForProject.resolverForModuleDescriptor(module).packageFragmentProvider.getPackageFragments(fqName)
|
return resolverForProject.resolverForModuleDescriptor(module).packageFragmentProvider.getPackageFragments(fqName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+18
-44
@@ -9,7 +9,6 @@ import org.jetbrains.kotlin.builtins.UnsignedTypes
|
|||||||
import org.jetbrains.kotlin.builtins.functions.FunctionInvokeDescriptor
|
import org.jetbrains.kotlin.builtins.functions.FunctionInvokeDescriptor
|
||||||
import org.jetbrains.kotlin.builtins.isExtensionFunctionType
|
import org.jetbrains.kotlin.builtins.isExtensionFunctionType
|
||||||
import org.jetbrains.kotlin.config.LanguageFeature
|
import org.jetbrains.kotlin.config.LanguageFeature
|
||||||
import org.jetbrains.kotlin.diagnostics.Errors
|
|
||||||
import org.jetbrains.kotlin.diagnostics.Errors.*
|
import org.jetbrains.kotlin.diagnostics.Errors.*
|
||||||
import org.jetbrains.kotlin.diagnostics.Errors.BadNamedArgumentsTarget.*
|
import org.jetbrains.kotlin.diagnostics.Errors.BadNamedArgumentsTarget.*
|
||||||
import org.jetbrains.kotlin.diagnostics.reportDiagnosticOnce
|
import org.jetbrains.kotlin.diagnostics.reportDiagnosticOnce
|
||||||
@@ -67,7 +66,7 @@ class DiagnosticReporterByTrackingStrategy(
|
|||||||
AbstractSuperCall::class.java -> tracingStrategy.abstractSuperCall(trace)
|
AbstractSuperCall::class.java -> tracingStrategy.abstractSuperCall(trace)
|
||||||
NonApplicableCallForBuilderInferenceDiagnostic::class.java -> {
|
NonApplicableCallForBuilderInferenceDiagnostic::class.java -> {
|
||||||
val reportOn = (diagnostic as NonApplicableCallForBuilderInferenceDiagnostic).kotlinCall
|
val reportOn = (diagnostic as NonApplicableCallForBuilderInferenceDiagnostic).kotlinCall
|
||||||
trace.reportDiagnosticOnce(Errors.NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE.on(reportOn.psiKotlinCall.psiCall.callElement))
|
trace.reportDiagnosticOnce(NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE.on(reportOn.psiKotlinCall.psiCall.callElement))
|
||||||
}
|
}
|
||||||
CandidateChosenUsingOverloadResolutionByLambdaAnnotation::class.java -> {
|
CandidateChosenUsingOverloadResolutionByLambdaAnnotation::class.java -> {
|
||||||
trace.report(CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION.on(psiKotlinCall.psiCall.callElement))
|
trace.report(CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION.on(psiKotlinCall.psiCall.callElement))
|
||||||
@@ -338,8 +337,8 @@ class DiagnosticReporterByTrackingStrategy(
|
|||||||
override fun constraintError(error: ConstraintSystemError) {
|
override fun constraintError(error: ConstraintSystemError) {
|
||||||
when (error.javaClass) {
|
when (error.javaClass) {
|
||||||
NewConstraintError::class.java -> {
|
NewConstraintError::class.java -> {
|
||||||
val constraintError = error as NewConstraintError
|
error as NewConstraintError
|
||||||
val position = constraintError.position.from
|
val position = error.position.from
|
||||||
val argument =
|
val argument =
|
||||||
when (position) {
|
when (position) {
|
||||||
is ArgumentConstraintPositionImpl -> position.argument
|
is ArgumentConstraintPositionImpl -> position.argument
|
||||||
@@ -351,16 +350,16 @@ class DiagnosticReporterByTrackingStrategy(
|
|||||||
argument?.let {
|
argument?.let {
|
||||||
it.safeAs<LambdaKotlinCallArgument>()?.let lambda@{ lambda ->
|
it.safeAs<LambdaKotlinCallArgument>()?.let lambda@{ lambda ->
|
||||||
val parameterTypes = lambda.parametersTypes?.toList() ?: return@lambda
|
val parameterTypes = lambda.parametersTypes?.toList() ?: return@lambda
|
||||||
val index = parameterTypes.indexOf(constraintError.upperKotlinType.unwrap())
|
val index = parameterTypes.indexOf(error.upperKotlinType.unwrap())
|
||||||
val lambdaExpression = lambda.psiExpression as? KtLambdaExpression ?: return@lambda
|
val lambdaExpression = lambda.psiExpression as? KtLambdaExpression ?: return@lambda
|
||||||
val parameter = lambdaExpression.valueParameters.getOrNull(index) ?: return@lambda
|
val parameter = lambdaExpression.valueParameters.getOrNull(index) ?: return@lambda
|
||||||
trace.report(Errors.EXPECTED_PARAMETER_TYPE_MISMATCH.on(parameter, constraintError.upperKotlinType))
|
trace.report(EXPECTED_PARAMETER_TYPE_MISMATCH.on(parameter, error.upperKotlinType))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val expression = it.psiExpression ?: return
|
val expression = it.psiExpression ?: return
|
||||||
val deparenthesized = KtPsiUtil.safeDeparenthesize(expression)
|
val deparenthesized = KtPsiUtil.safeDeparenthesize(expression)
|
||||||
if (reportConstantTypeMismatch(constraintError, deparenthesized)) return
|
if (reportConstantTypeMismatch(error, deparenthesized)) return
|
||||||
|
|
||||||
val compileTimeConstant = trace[BindingContext.COMPILE_TIME_VALUE, deparenthesized] as? TypedCompileTimeConstant
|
val compileTimeConstant = trace[BindingContext.COMPILE_TIME_VALUE, deparenthesized] as? TypedCompileTimeConstant
|
||||||
if (compileTimeConstant != null) {
|
if (compileTimeConstant != null) {
|
||||||
@@ -371,40 +370,22 @@ class DiagnosticReporterByTrackingStrategy(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
trace.report(
|
trace.report(TYPE_MISMATCH.on(deparenthesized, error.upperKotlinType, error.lowerKotlinType))
|
||||||
Errors.TYPE_MISMATCH.on(
|
|
||||||
deparenthesized,
|
|
||||||
constraintError.upperKotlinType,
|
|
||||||
constraintError.lowerKotlinType
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(position as? ExpectedTypeConstraintPositionImpl)?.let {
|
(position as? ExpectedTypeConstraintPositionImpl)?.let {
|
||||||
val call = it.topLevelCall.psiKotlinCall.psiCall.callElement.safeAs<KtExpression>()
|
val call = it.topLevelCall.psiKotlinCall.psiCall.callElement.safeAs<KtExpression>()
|
||||||
val inferredType =
|
val inferredType =
|
||||||
if (!constraintError.lowerKotlinType.isNullableNothing()) constraintError.lowerKotlinType
|
if (!error.lowerKotlinType.isNullableNothing()) error.lowerKotlinType
|
||||||
else constraintError.upperKotlinType.makeNullable()
|
else error.upperKotlinType.makeNullable()
|
||||||
if (call != null) {
|
if (call != null) {
|
||||||
trace.report(
|
trace.report(TYPE_MISMATCH.on(call, error.upperKotlinType, inferredType))
|
||||||
Errors.TYPE_MISMATCH.on(
|
|
||||||
call,
|
|
||||||
constraintError.upperKotlinType,
|
|
||||||
inferredType
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(position as? ExplicitTypeParameterConstraintPositionImpl)?.let {
|
(position as? ExplicitTypeParameterConstraintPositionImpl)?.let {
|
||||||
val typeArgumentReference = (it.typeArgument as SimpleTypeArgumentImpl).typeReference
|
val typeArgumentReference = (it.typeArgument as SimpleTypeArgumentImpl).typeReference
|
||||||
trace.report(
|
trace.report(UPPER_BOUND_VIOLATED.on(typeArgumentReference, error.upperKotlinType, error.lowerKotlinType))
|
||||||
UPPER_BOUND_VIOLATED.on(
|
|
||||||
typeArgumentReference,
|
|
||||||
constraintError.upperKotlinType,
|
|
||||||
constraintError.lowerKotlinType
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(position as? FixVariableConstraintPositionImpl)?.let {
|
(position as? FixVariableConstraintPositionImpl)?.let {
|
||||||
@@ -417,36 +398,29 @@ class DiagnosticReporterByTrackingStrategy(
|
|||||||
val call = it.resolvedAtom?.atom?.safeAs<PSIKotlinCall>()?.psiCall ?: call
|
val call = it.resolvedAtom?.atom?.safeAs<PSIKotlinCall>()?.psiCall ?: call
|
||||||
val expression = call.calleeExpression ?: return
|
val expression = call.calleeExpression ?: return
|
||||||
|
|
||||||
trace.reportDiagnosticOnce(
|
trace.reportDiagnosticOnce(TYPE_MISMATCH.on(expression, error.upperKotlinType, error.lowerKotlinType))
|
||||||
TYPE_MISMATCH.on(
|
|
||||||
expression,
|
|
||||||
constraintError.upperKotlinType,
|
|
||||||
constraintError.lowerKotlinType
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CapturedTypeFromSubtyping::class.java -> {
|
CapturedTypeFromSubtyping::class.java -> {
|
||||||
val capturedError = error as CapturedTypeFromSubtyping
|
error as CapturedTypeFromSubtyping
|
||||||
val position = capturedError.position
|
val position = error.position
|
||||||
val argumentPosition =
|
val argumentPosition: ArgumentConstraintPositionImpl? =
|
||||||
position.safeAs<ArgumentConstraintPositionImpl>()
|
position.safeAs() ?: position.safeAs<IncorporationConstraintPosition>()?.from.safeAs()
|
||||||
?: position.safeAs<IncorporationConstraintPosition>()?.from.safeAs<ArgumentConstraintPositionImpl>()
|
|
||||||
|
|
||||||
argumentPosition?.let {
|
argumentPosition?.let {
|
||||||
val expression = it.argument.psiExpression ?: return
|
val expression = it.argument.psiExpression ?: return
|
||||||
trace.reportDiagnosticOnce(
|
trace.reportDiagnosticOnce(
|
||||||
NEW_INFERENCE_ERROR.on(
|
NEW_INFERENCE_ERROR.on(
|
||||||
expression,
|
expression,
|
||||||
"Capture type from subtyping ${capturedError.constraintType} for variable ${capturedError.typeVariable}"
|
"Capture type from subtyping ${error.constraintType} for variable ${error.typeVariable}"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NotEnoughInformationForTypeParameterImpl::class.java -> {
|
NotEnoughInformationForTypeParameterImpl::class.java -> {
|
||||||
val error = error as NotEnoughInformationForTypeParameterImpl
|
error as NotEnoughInformationForTypeParameterImpl
|
||||||
if (allDiagnostics.any {
|
if (allDiagnostics.any {
|
||||||
when (it) {
|
when (it) {
|
||||||
is WrongCountOfTypeArguments -> true
|
is WrongCountOfTypeArguments -> true
|
||||||
|
|||||||
+2
-4
@@ -661,10 +661,8 @@ sealed class NewAbstractResolvedCall<D : CallableDescriptor>() : ResolvedCall<D>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (varargMappings != null && !needToUseCorrectExecutionOrderForVarargArguments) {
|
if (varargMappings != null && !needToUseCorrectExecutionOrderForVarargArguments) {
|
||||||
if (varargMappings != null) {
|
for ((parameter, argument) in varargMappings) {
|
||||||
for ((parameter, argument) in varargMappings) {
|
result[parameter] = argument
|
||||||
result[parameter] = argument
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-5
@@ -6,18 +6,14 @@
|
|||||||
package org.jetbrains.kotlin.ir.backend.js.lower.calls
|
package org.jetbrains.kotlin.ir.backend.js.lower.calls
|
||||||
|
|
||||||
import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext
|
import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrDynamicOperator
|
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression
|
import org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression
|
||||||
import org.jetbrains.kotlin.ir.expressions.impl.IrDynamicOperatorExpressionImpl
|
|
||||||
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
|
|
||||||
|
|
||||||
// TODO use nativeX annotations on kotlin.js.Json instead
|
// TODO use nativeX annotations on kotlin.js.Json instead
|
||||||
class JsonIntrinsics(context: JsIrBackendContext) : NativeGetterSetterTransformer(context) {
|
class JsonIntrinsics(context: JsIrBackendContext) : NativeGetterSetterTransformer(context) {
|
||||||
|
override fun transformFunctionAccess(call: IrFunctionAccessExpression, doNotIntrinsify: Boolean): IrExpression {
|
||||||
override fun transformFunctionAccess(call: IrFunctionAccessExpression, skip: Boolean): IrExpression {
|
|
||||||
return when (call.symbol.owner.fqNameWhenAvailable) {
|
return when (call.symbol.owner.fqNameWhenAvailable) {
|
||||||
FqName("kotlin.js.Json.get") -> call.transformToIndexedRead()
|
FqName("kotlin.js.Json.get") -> call.transformToIndexedRead()
|
||||||
FqName("kotlin.js.Json.set") -> call.transformToIndexedWrite()
|
FqName("kotlin.js.Json.set") -> call.transformToIndexedWrite()
|
||||||
|
|||||||
+1
-1
@@ -235,7 +235,7 @@ class JsIntrinsicTransformers(backendContext: JsIrBackendContext) {
|
|||||||
val value = args[1]
|
val value = args[1]
|
||||||
jsAssignment(JsNameRef(Namer.SHARED_BOX_V, box), value)
|
jsAssignment(JsNameRef(Namer.SHARED_BOX_V, box), value)
|
||||||
}
|
}
|
||||||
add(intrinsics.jsUndefined) { call: IrCall, context: JsGenerationContext ->
|
add(intrinsics.jsUndefined) { _, _ ->
|
||||||
JsPrefixOperation(JsUnaryOperator.VOID, JsIntLiteral(1))
|
JsPrefixOperation(JsUnaryOperator.VOID, JsIntLiteral(1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-5
@@ -22,12 +22,10 @@ import org.jetbrains.kotlin.ir.declarations.*
|
|||||||
import org.jetbrains.kotlin.ir.expressions.IrMemberAccessExpression
|
import org.jetbrains.kotlin.ir.expressions.IrMemberAccessExpression
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
import org.jetbrains.kotlin.ir.util.DataClassMembersGenerator
|
import org.jetbrains.kotlin.ir.util.DataClassMembersGenerator
|
||||||
import org.jetbrains.kotlin.ir.util.SYNTHETIC_OFFSET
|
|
||||||
import org.jetbrains.kotlin.ir.util.declareSimpleFunctionWithOverrides
|
import org.jetbrains.kotlin.ir.util.declareSimpleFunctionWithOverrides
|
||||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||||
import org.jetbrains.kotlin.psi.KtParameter
|
import org.jetbrains.kotlin.psi.KtParameter
|
||||||
import org.jetbrains.kotlin.resolve.BindingContext
|
import org.jetbrains.kotlin.resolve.BindingContext
|
||||||
import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A generator that generates synthetic members of data class as well as part of inline class.
|
* A generator that generates synthetic members of data class as well as part of inline class.
|
||||||
@@ -88,9 +86,6 @@ class DataClassMembersGenerator(
|
|||||||
override fun generateComponentFunction(function: FunctionDescriptor, parameter: ValueParameterDescriptor) {
|
override fun generateComponentFunction(function: FunctionDescriptor, parameter: ValueParameterDescriptor) {
|
||||||
if (!irClass.isData) return
|
if (!irClass.isData) return
|
||||||
|
|
||||||
val ktParameter = DescriptorToSourceUtils.descriptorToDeclaration(parameter)
|
|
||||||
?: throw AssertionError("No definition for data class constructor parameter $parameter")
|
|
||||||
|
|
||||||
val backingField = irDataClassMembersGenerator.getBackingField(parameter, null) ?: return
|
val backingField = irDataClassMembersGenerator.getBackingField(parameter, null) ?: return
|
||||||
irDataClassMembersGenerator.generateComponentFunction(function, backingField)
|
irDataClassMembersGenerator.generateComponentFunction(function, backingField)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -20,7 +20,6 @@ import org.jetbrains.kotlin.descriptors.*
|
|||||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||||
import org.jetbrains.kotlin.descriptors.impl.PropertyGetterDescriptorImpl
|
import org.jetbrains.kotlin.descriptors.impl.PropertyGetterDescriptorImpl
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrExpressionBody
|
import org.jetbrains.kotlin.ir.expressions.IrExpressionBody
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
|
import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
|
||||||
import org.jetbrains.kotlin.ir.expressions.impl.IrGetValueImpl
|
import org.jetbrains.kotlin.ir.expressions.impl.IrGetValueImpl
|
||||||
@@ -42,7 +41,7 @@ class PropertyGenerator(declarationGenerator: DeclarationGenerator) : Declaratio
|
|||||||
generateSimpleProperty(ktProperty, propertyDescriptor)
|
generateSimpleProperty(ktProperty, propertyDescriptor)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun generateDestructuringDeclarationEntryAsPropertyDeclaration(ktEntry: KtDestructuringDeclarationEntry, entryInitializer: IrExpression): IrProperty {
|
fun generateDestructuringDeclarationEntryAsPropertyDeclaration(ktEntry: KtDestructuringDeclarationEntry): IrProperty {
|
||||||
val propertyDescriptor = getPropertyDescriptor(ktEntry)
|
val propertyDescriptor = getPropertyDescriptor(ktEntry)
|
||||||
return context.symbolTable.declareProperty(
|
return context.symbolTable.declareProperty(
|
||||||
ktEntry.startOffsetSkippingComments, ktEntry.endOffset,
|
ktEntry.startOffsetSkippingComments, ktEntry.endOffset,
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ class ScriptGenerator(declarationGenerator: DeclarationGenerator) : DeclarationG
|
|||||||
|
|
||||||
val irComponentProperty =
|
val irComponentProperty =
|
||||||
PropertyGenerator(declarationGenerator).generateDestructuringDeclarationEntryAsPropertyDeclaration(
|
PropertyGenerator(declarationGenerator).generateDestructuringDeclarationEntryAsPropertyDeclaration(
|
||||||
ktEntry, irComponentCall
|
ktEntry
|
||||||
)
|
)
|
||||||
val irComponentBackingField = irComponentProperty.backingField!!
|
val irComponentBackingField = irComponentProperty.backingField!!
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.resolve.calls.inference.components
|
package org.jetbrains.kotlin.resolve.calls.inference.components
|
||||||
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.config.LanguageFeature
|
import org.jetbrains.kotlin.config.LanguageFeature
|
||||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemOperation
|
import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemOperation
|
||||||
@@ -196,8 +195,8 @@ class ConstraintInjector(
|
|||||||
return baseContext.substitutionSupertypePolicy(type)
|
return baseContext.substitutionSupertypePolicy(type)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun areEqualTypeConstructors(a: TypeConstructorMarker, b: TypeConstructorMarker): Boolean {
|
override fun areEqualTypeConstructors(c1: TypeConstructorMarker, c2: TypeConstructorMarker): Boolean {
|
||||||
return baseContext.areEqualTypeConstructors(a, b)
|
return baseContext.areEqualTypeConstructors(c1, c2)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun prepareType(type: KotlinTypeMarker): KotlinTypeMarker {
|
override fun prepareType(type: KotlinTypeMarker): KotlinTypeMarker {
|
||||||
|
|||||||
+1
-1
@@ -85,7 +85,7 @@ class AnnotationTypeQualifierResolver(storageManager: StorageManager, private va
|
|||||||
|
|
||||||
return BUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATIONS[annotationDescriptor.fqName]?.let { qualifierForDefaultingAnnotation ->
|
return BUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATIONS[annotationDescriptor.fqName]?.let { qualifierForDefaultingAnnotation ->
|
||||||
val state = resolveDefaultAnnotationState(annotationDescriptor).takeIf { it != ReportLevel.IGNORE } ?: return null
|
val state = resolveDefaultAnnotationState(annotationDescriptor).takeIf { it != ReportLevel.IGNORE } ?: return null
|
||||||
return qualifierForDefaultingAnnotation.copy(
|
qualifierForDefaultingAnnotation.copy(
|
||||||
nullabilityQualifier = qualifierForDefaultingAnnotation.nullabilityQualifier.copy(isForWarningOnly = state.isWarning)
|
nullabilityQualifier = qualifierForDefaultingAnnotation.nullabilityQualifier.copy(isForWarningOnly = state.isWarning)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ class JavaDescriptorResolver(
|
|||||||
|
|
||||||
if (fqName == null) return null
|
if (fqName == null) return null
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
return packageFragmentProvider.getPackageFragments(fqName.parent()).firstOrNull()?.findClassifierByJavaClass(javaClass)
|
return packageFragmentProvider.getPackageFragments(fqName.parent()).firstOrNull()?.findClassifierByJavaClass(javaClass)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ fun PackageFragmentProvider.collectPackageFragmentsOptimizedIfPossible(
|
|||||||
) {
|
) {
|
||||||
when (this) {
|
when (this) {
|
||||||
is PackageFragmentProviderOptimized -> collectPackageFragments(fqName, packageFragments)
|
is PackageFragmentProviderOptimized -> collectPackageFragments(fqName, packageFragments)
|
||||||
else -> packageFragments.addAll(getPackageFragments(fqName))
|
else -> packageFragments.addAll(@Suppress("DEPRECATION") getPackageFragments(fqName))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -47,10 +47,10 @@ open class ClassicTypeCheckerContext(
|
|||||||
override val isStubTypeEqualsToAnything: Boolean
|
override val isStubTypeEqualsToAnything: Boolean
|
||||||
get() = stubTypeEqualsToAnything
|
get() = stubTypeEqualsToAnything
|
||||||
|
|
||||||
override fun areEqualTypeConstructors(a: TypeConstructorMarker, b: TypeConstructorMarker): Boolean {
|
override fun areEqualTypeConstructors(c1: TypeConstructorMarker, c2: TypeConstructorMarker): Boolean {
|
||||||
require(a is TypeConstructor, a::errorMessage)
|
require(c1 is TypeConstructor, c1::errorMessage)
|
||||||
require(b is TypeConstructor, b::errorMessage)
|
require(c2 is TypeConstructor, c2::errorMessage)
|
||||||
return areEqualTypeConstructors(a, b)
|
return areEqualTypeConstructors(c1, c2)
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun areEqualTypeConstructors(a: TypeConstructor, b: TypeConstructor): Boolean = when {
|
open fun areEqualTypeConstructors(a: TypeConstructor, b: TypeConstructor): Boolean = when {
|
||||||
|
|||||||
+1
-1
@@ -94,7 +94,7 @@ interface IrBuilderExtension {
|
|||||||
irInvoke(
|
irInvoke(
|
||||||
dispatchReceiver,
|
dispatchReceiver,
|
||||||
callee,
|
callee,
|
||||||
args = valueArguments.toTypedArray(),
|
*valueArguments.toTypedArray(),
|
||||||
typeHint = returnTypeHint
|
typeHint = returnTypeHint
|
||||||
).also { call -> typeArguments.forEachIndexed(call::putTypeArgument) }
|
).also { call -> typeArguments.forEachIndexed(call::putTypeArgument) }
|
||||||
|
|
||||||
|
|||||||
-1
@@ -372,7 +372,6 @@ open class SerializerCodegenImpl(
|
|||||||
for ((index, property) in serializableProperties.withIndex()) {
|
for ((index, property) in serializableProperties.withIndex()) {
|
||||||
val propertyType = codegen.typeMapper.mapType(property.type)
|
val propertyType = codegen.typeMapper.mapType(property.type)
|
||||||
if (!property.transient) {
|
if (!property.transient) {
|
||||||
val propertyAddressInBitMask = bitMaskOff(index)
|
|
||||||
// labelI:
|
// labelI:
|
||||||
visitLabel(labels[labelNum + 1])
|
visitLabel(labels[labelNum + 1])
|
||||||
callReadProperty(property, propertyType, index, inputVar, descVar, propVar)
|
callReadProperty(property, propertyType, index, inputVar, descVar, propVar)
|
||||||
|
|||||||
Reference in New Issue
Block a user