[FE] Show causing types in the INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION diagnostic
This commit is contained in:
committed by
teamcity
parent
6a34b184ac
commit
867ad24c86
+4
-1
@@ -688,12 +688,15 @@ object DIAGNOSTICS_LIST : DiagnosticList("FirErrors") {
|
||||
val INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION by error<PsiElement> {
|
||||
parameter<String>("typeVariableDescription")
|
||||
parameter<Collection<ConeKotlinType>>("incompatibleTypes")
|
||||
parameter<String>("kind")
|
||||
parameter<String>("description")
|
||||
parameter<String>("causingTypes")
|
||||
}
|
||||
|
||||
val INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION by warning<PsiElement> {
|
||||
parameter<String>("typeVariableDescription")
|
||||
parameter<Collection<ConeKotlinType>>("incompatibleTypes")
|
||||
parameter<String>("description")
|
||||
parameter<String>("causingTypes")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -412,8 +412,8 @@ object FirErrors {
|
||||
val SMARTCAST_IMPOSSIBLE by error4<KtExpression, ConeKotlinType, FirExpression, String, Boolean>()
|
||||
val REDUNDANT_NULLABLE by warning0<KtTypeReference>(SourceElementPositioningStrategies.REDUNDANT_NULLABLE)
|
||||
val PLATFORM_CLASS_MAPPED_TO_KOTLIN by warning1<PsiElement, FqName>(SourceElementPositioningStrategies.REFERENCED_NAME_BY_QUALIFIED)
|
||||
val INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION by error3<PsiElement, String, Collection<ConeKotlinType>, String>()
|
||||
val INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION by warning2<PsiElement, String, Collection<ConeKotlinType>>()
|
||||
val INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION by error4<PsiElement, String, Collection<ConeKotlinType>, String, String>()
|
||||
val INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION by warning4<PsiElement, String, Collection<ConeKotlinType>, String, String>()
|
||||
|
||||
// Reflection
|
||||
val EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED by error1<KtExpression, FirCallableSymbol<*>>(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED)
|
||||
|
||||
+6
-3
@@ -950,16 +950,19 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
|
||||
map.put(INFERENCE_UNSUCCESSFUL_FORK, "Unsuccessful inference fork at position: {0}", TO_STRING)
|
||||
map.put(
|
||||
INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION,
|
||||
"Type argument for a type parameter {0} can''t be inferred because it has incompatible upper bounds ({2}): {1}",
|
||||
"Type argument for a type parameter {0} can''t be inferred because it has incompatible upper bounds: {1} ({2}{3})",
|
||||
TO_STRING,
|
||||
RENDER_COLLECTION_OF_TYPES,
|
||||
TO_STRING,
|
||||
TO_STRING
|
||||
)
|
||||
map.put(
|
||||
INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION,
|
||||
"Type argument for a type parameter {0} has possible incompatible upper bounds: {1}",
|
||||
"Type argument for a type parameter {0} has possible incompatible upper bounds: {1} ({2}{3})",
|
||||
TO_STRING,
|
||||
RENDER_COLLECTION_OF_TYPES
|
||||
RENDER_COLLECTION_OF_TYPES,
|
||||
TO_STRING,
|
||||
TO_STRING
|
||||
)
|
||||
|
||||
map.put(TYPE_MISMATCH, "Type mismatch: inferred type is {1} but {0} was expected", TO_STRING, TO_STRING, NOT_RENDERED)
|
||||
|
||||
+11
-9
@@ -257,8 +257,9 @@ private fun mapInapplicableCandidateError(
|
||||
diagnostic.candidate
|
||||
)
|
||||
}
|
||||
is InferredEmptyIntersectionDiagnostic ->
|
||||
reportInferredIntoEmptyIntersectionError(source, rootCause.typeVariable, rootCause.incompatibleTypes, rootCause.kind)
|
||||
is InferredEmptyIntersectionDiagnostic -> reportInferredIntoEmptyIntersectionError(
|
||||
source, rootCause.typeVariable, rootCause.incompatibleTypes, rootCause.causingTypes, rootCause.kind
|
||||
)
|
||||
else -> genericDiagnostic
|
||||
}
|
||||
}.distinct()
|
||||
@@ -400,6 +401,7 @@ private fun ConstraintSystemError.toDiagnostic(
|
||||
source,
|
||||
typeVariable as ConeTypeVariable,
|
||||
incompatibleTypes as Collection<ConeKotlinType>,
|
||||
causingTypes as Collection<ConeKotlinType>,
|
||||
kind
|
||||
)
|
||||
}
|
||||
@@ -411,18 +413,18 @@ private fun reportInferredIntoEmptyIntersectionError(
|
||||
source: KtSourceElement,
|
||||
typeVariable: ConeTypeVariable,
|
||||
incompatibleTypes: Collection<ConeKotlinType>,
|
||||
causingTypes: Collection<ConeKotlinType>,
|
||||
kind: EmptyIntersectionTypeKind
|
||||
): KtDiagnostic? {
|
||||
val typeVariableText =
|
||||
(typeVariable.typeConstructor.originalTypeParameter as? ConeTypeParameterLookupTag)?.name?.asString()
|
||||
?: typeVariable.toString()
|
||||
return if (kind.isPossiblyEmpty()) {
|
||||
FirErrors.INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION.createOn(source, typeVariableText, incompatibleTypes)
|
||||
} else {
|
||||
FirErrors.INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION.createOn(
|
||||
source, typeVariableText, incompatibleTypes, kind.description?.let { " ($it)" }.orEmpty()
|
||||
)
|
||||
}
|
||||
val causingTypesText = if (incompatibleTypes == causingTypes) "" else ": ${causingTypes.joinToString()}"
|
||||
val factory = if (kind.isPossiblyEmpty())
|
||||
FirErrors.INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION else
|
||||
FirErrors.INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION
|
||||
|
||||
return factory.createOn(source, typeVariableText, incompatibleTypes, kind.description, causingTypesText)
|
||||
}
|
||||
|
||||
private val NewConstraintError.lowerConeType: ConeKotlinType get() = lowerType as ConeKotlinType
|
||||
|
||||
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.fir.expressions.*
|
||||
import org.jetbrains.kotlin.fir.languageVersionSettings
|
||||
import org.jetbrains.kotlin.fir.matchingParameterFunctionType
|
||||
import org.jetbrains.kotlin.fir.references.FirSuperReference
|
||||
import org.jetbrains.kotlin.fir.resolve.dfa.symbol
|
||||
import org.jetbrains.kotlin.fir.resolve.directExpansionType
|
||||
import org.jetbrains.kotlin.fir.resolve.fullyExpandedType
|
||||
import org.jetbrains.kotlin.fir.resolve.inference.ConeTypeParameterBasedTypeVariable
|
||||
@@ -582,15 +581,15 @@ internal object CheckIncompatibleTypeVariableUpperBounds : ResolutionStage() {
|
||||
if (upperTypes.size <= 1 || variableWithConstraints.constraints.any { it.kind.isLower() })
|
||||
continue
|
||||
|
||||
val emptyIntersectionKind = candidate.system.getEmptyIntersectionTypeKind(upperTypes).takeIf { it.isDefinitelyEmpty() }
|
||||
?: continue
|
||||
val emptyIntersectionTypeInfo = candidate.system.getEmptyIntersectionTypeKind(upperTypes) ?: continue
|
||||
|
||||
sink.yieldDiagnostic(
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
InferredEmptyIntersectionDiagnostic(
|
||||
upperTypes as Collection<ConeKotlinType>,
|
||||
upperTypes as List<ConeKotlinType>,
|
||||
emptyIntersectionTypeInfo.casingTypes.toList() as List<ConeKotlinType>,
|
||||
variableWithConstraints.typeVariable as ConeTypeVariable,
|
||||
emptyIntersectionKind
|
||||
emptyIntersectionTypeInfo.kind
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
+2
-1
@@ -56,6 +56,7 @@ import org.jetbrains.kotlin.resolve.calls.tower.CandidateApplicability
|
||||
import org.jetbrains.kotlin.resolve.calls.tower.isSuccess
|
||||
import org.jetbrains.kotlin.types.TypeApproximatorConfiguration
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
import org.jetbrains.kotlin.types.isDefinitelyEmpty
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.runIf
|
||||
import kotlin.collections.component1
|
||||
import kotlin.collections.component2
|
||||
@@ -852,7 +853,7 @@ class FirCallCompletionResultsWriterTransformer(
|
||||
}
|
||||
|
||||
private fun FirNamedReferenceWithCandidate.hasAdditionalResolutionErrors(): Boolean =
|
||||
candidate.system.errors.any { it is InferredEmptyIntersection }
|
||||
candidate.system.errors.any { it is InferredEmptyIntersection && it.kind.isDefinitelyEmpty() }
|
||||
|
||||
private fun FirNamedReferenceWithCandidate.toResolvedReference(): FirNamedReference {
|
||||
val errorDiagnostic = when {
|
||||
|
||||
+1
@@ -31,6 +31,7 @@ class MixingNamedAndPositionArguments(override val argument: FirExpression) : In
|
||||
|
||||
class InferredEmptyIntersectionDiagnostic(
|
||||
val incompatibleTypes: Collection<ConeKotlinType>,
|
||||
val causingTypes: Collection<ConeKotlinType>,
|
||||
val typeVariable: ConeTypeVariable,
|
||||
val kind: EmptyIntersectionTypeKind
|
||||
) : ResolutionDiagnostic(INAPPLICABLE)
|
||||
|
||||
@@ -899,10 +899,10 @@ public interface Errors {
|
||||
|
||||
DiagnosticFactoryForDeprecation1<PsiElement, TypeParameterDescriptor> TYPE_INFERENCE_ONLY_INPUT_TYPES =
|
||||
DiagnosticFactoryForDeprecation1.create(LanguageFeature.StrictOnlyInputTypesChecks);
|
||||
DiagnosticFactoryForDeprecation3<PsiElement, String, Collection<KotlinType>, String> INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION =
|
||||
DiagnosticFactoryForDeprecation3.create(LanguageFeature.ForbidInferringTypeVariablesIntoEmptyIntersection);
|
||||
DiagnosticFactory2<PsiElement, String, Collection<KotlinType>> INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION =
|
||||
DiagnosticFactory2.create(WARNING);
|
||||
DiagnosticFactoryForDeprecation4<PsiElement, String, Collection<KotlinType>, String, String> INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION =
|
||||
DiagnosticFactoryForDeprecation4.create(LanguageFeature.ForbidInferringTypeVariablesIntoEmptyIntersection);
|
||||
DiagnosticFactory4<PsiElement, String, Collection<KotlinType>, String, String> INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION =
|
||||
DiagnosticFactory4.create(WARNING);
|
||||
DiagnosticFactory1<PsiElement, InferenceErrorData> TYPE_INFERENCE_UPPER_BOUND_VIOLATED = DiagnosticFactory1.create(ERROR);
|
||||
DiagnosticFactory2<KtElement, KotlinType, KotlinType> TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory0<PsiElement> TYPE_INFERENCE_CANDIDATE_WITH_SAM_AND_VARARG = DiagnosticFactory0.create(WARNING);
|
||||
|
||||
+2
-2
@@ -965,8 +965,8 @@ public class DefaultErrorMessages {
|
||||
MAP.put(TYPE_INFERENCE_INCORPORATION_ERROR, "Type inference failed. Please try to specify type arguments explicitly.");
|
||||
MAP.put(TYPE_INFERENCE_ONLY_INPUT_TYPES, "Type inference failed. The value of the type parameter {0} should be mentioned in input types " +
|
||||
"(argument types, receiver type or expected type). Try to specify it explicitly.", NAME);
|
||||
MAP.put(INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION, "Type argument for a type parameter {0} can''t be inferred because it has incompatible upper bounds {2}: {1}", TO_STRING, RENDER_COLLECTION_OF_TYPES, TO_STRING);
|
||||
MAP.put(INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION, "Type argument for a type parameter {0} has possible incompatible upper bounds: {1}", TO_STRING, RENDER_COLLECTION_OF_TYPES);
|
||||
MAP.put(INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION, "Type argument for a type parameter {0} can''t be inferred because it has incompatible upper bounds: {1} ({2}{3})", TO_STRING, RENDER_COLLECTION_OF_TYPES, TO_STRING, TO_STRING);
|
||||
MAP.put(INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION, "Type argument for a type parameter {0} has possible incompatible upper bounds: {1} ({2}{3})", TO_STRING, RENDER_COLLECTION_OF_TYPES, TO_STRING, TO_STRING);
|
||||
MAP.put(TYPE_INFERENCE_UPPER_BOUND_VIOLATED, "{0}", TYPE_INFERENCE_UPPER_BOUND_VIOLATED_RENDERER);
|
||||
MAP.put(TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH, "Type inference failed. Expected type mismatch: inferred type is {1} but {0} was expected", RENDER_TYPE, RENDER_TYPE);
|
||||
MAP.put(TYPE_INFERENCE_CANDIDATE_WITH_SAM_AND_VARARG, "Please use spread operator to pass an array as vararg. It will be an error in 1.5.");
|
||||
|
||||
+8
-3
@@ -610,14 +610,19 @@ class DiagnosticReporterByTrackingStrategy(
|
||||
?: typeVariable.toString()
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val incompatibleTypes = error.incompatibleTypes as Collection<KotlinType>
|
||||
val incompatibleTypes = error.incompatibleTypes as List<KotlinType>
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val causingTypes = error.causingTypes as List<KotlinType>
|
||||
val causingTypesText = if (incompatibleTypes == causingTypes) "" else ": ${causingTypes.joinToString()}"
|
||||
val diagnostic = if (error.kind.isPossiblyEmpty()) {
|
||||
INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION.on(expression, typeVariableText, incompatibleTypes)
|
||||
INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION.on(
|
||||
expression, typeVariableText, incompatibleTypes, error.kind.description, causingTypesText
|
||||
)
|
||||
} else {
|
||||
INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION.on(
|
||||
context.languageVersionSettings, expression, typeVariableText,
|
||||
incompatibleTypes, error.kind.description?.let { " ($it)" }.orEmpty()
|
||||
incompatibleTypes, error.kind.description, causingTypesText
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemC
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.Constraint
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintSystemError
|
||||
import org.jetbrains.kotlin.types.EmptyIntersectionTypeKind
|
||||
import org.jetbrains.kotlin.resolve.checkers.EmptyIntersectionTypeInfo
|
||||
import org.jetbrains.kotlin.types.model.KotlinTypeMarker
|
||||
import org.jetbrains.kotlin.types.model.TypeVariableMarker
|
||||
|
||||
@@ -27,7 +27,7 @@ interface NewConstraintSystem {
|
||||
fun asPostponedArgumentsAnalyzerContext(): PostponedArgumentsAnalyzerContext
|
||||
fun processForkConstraints()
|
||||
|
||||
fun getEmptyIntersectionTypeKind(types: Collection<KotlinTypeMarker>): EmptyIntersectionTypeKind
|
||||
fun getEmptyIntersectionTypeKind(types: Collection<KotlinTypeMarker>): EmptyIntersectionTypeInfo?
|
||||
}
|
||||
|
||||
typealias ForkPointData = List<ConstraintsFromSingleFork>
|
||||
|
||||
+6
-3
@@ -137,19 +137,22 @@ class ConstrainingTypeIsError(
|
||||
class NoSuccessfulFork(val position: IncorporationConstraintPosition) : ConstraintSystemError(INAPPLICABLE)
|
||||
|
||||
sealed interface InferredEmptyIntersection {
|
||||
val incompatibleTypes: Collection<KotlinTypeMarker>
|
||||
val incompatibleTypes: List<KotlinTypeMarker>
|
||||
val causingTypes: List<KotlinTypeMarker>
|
||||
val typeVariable: TypeVariableMarker
|
||||
val kind: EmptyIntersectionTypeKind
|
||||
}
|
||||
|
||||
class InferredEmptyIntersectionWarning(
|
||||
override val incompatibleTypes: Collection<KotlinTypeMarker>,
|
||||
override val incompatibleTypes: List<KotlinTypeMarker>,
|
||||
override val causingTypes: List<KotlinTypeMarker>,
|
||||
override val typeVariable: TypeVariableMarker,
|
||||
override val kind: EmptyIntersectionTypeKind,
|
||||
) : ConstraintSystemError(RESOLVED), InferredEmptyIntersection
|
||||
|
||||
class InferredEmptyIntersectionError(
|
||||
override val incompatibleTypes: Collection<KotlinTypeMarker>,
|
||||
override val incompatibleTypes: List<KotlinTypeMarker>,
|
||||
override val causingTypes: List<KotlinTypeMarker>,
|
||||
override val typeVariable: TypeVariableMarker,
|
||||
override val kind: EmptyIntersectionTypeKind,
|
||||
) : ConstraintSystemError(INAPPLICABLE), InferredEmptyIntersection
|
||||
|
||||
+8
-5
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||
import org.jetbrains.kotlin.resolve.calls.components.PostponedArgumentsAnalyzerContext
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.*
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.*
|
||||
import org.jetbrains.kotlin.resolve.checkers.EmptyIntersectionTypeInfo
|
||||
import org.jetbrains.kotlin.types.*
|
||||
import org.jetbrains.kotlin.types.model.*
|
||||
import org.jetbrains.kotlin.utils.SmartList
|
||||
@@ -38,7 +39,7 @@ class NewConstraintSystemImpl(
|
||||
private val typeVariablesTransaction: MutableList<TypeVariableMarker> = SmartList()
|
||||
private val properTypesCache: MutableSet<KotlinTypeMarker> = SmartSet.create()
|
||||
private val notProperTypesCache: MutableSet<KotlinTypeMarker> = SmartSet.create()
|
||||
private val intersectionTypesCache: MutableMap<Collection<KotlinTypeMarker>, EmptyIntersectionTypeKind> = mutableMapOf()
|
||||
private val intersectionTypesCache: MutableMap<Collection<KotlinTypeMarker>, EmptyIntersectionTypeInfo?> = mutableMapOf()
|
||||
private var couldBeResolvedWithUnrestrictedBuilderInference: Boolean = false
|
||||
|
||||
override var atCompletionState: Boolean = false
|
||||
@@ -441,7 +442,7 @@ class NewConstraintSystemImpl(
|
||||
doPostponedComputationsIfAllVariablesAreFixed()
|
||||
}
|
||||
|
||||
override fun getEmptyIntersectionTypeKind(types: Collection<KotlinTypeMarker>): EmptyIntersectionTypeKind {
|
||||
override fun getEmptyIntersectionTypeKind(types: Collection<KotlinTypeMarker>): EmptyIntersectionTypeInfo? {
|
||||
if (types in intersectionTypesCache)
|
||||
return intersectionTypesCache.getValue(types)
|
||||
|
||||
@@ -458,18 +459,20 @@ class NewConstraintSystemImpl(
|
||||
if (upperTypes.size <= 1 || storage.errors.any { it is InferredEmptyIntersection && it.incompatibleTypes == upperTypes })
|
||||
return
|
||||
|
||||
val emptyIntersectionKind = getEmptyIntersectionTypeKind(upperTypes).takeIf { it.isEmpty() } ?: return
|
||||
val emptyIntersectionTypeInfo = getEmptyIntersectionTypeKind(upperTypes) ?: return
|
||||
|
||||
// Remove existing errors from the resolution stage because a completion stage error is always more precise
|
||||
storage.errors.removeIf { it is InferredEmptyIntersection }
|
||||
|
||||
val isInferredEmptyIntersectionForbidden =
|
||||
languageVersionSettings.supportsFeature(LanguageFeature.ForbidInferringTypeVariablesIntoEmptyIntersection)
|
||||
val errorFactory = if (emptyIntersectionKind.isDefinitelyEmpty() && isInferredEmptyIntersectionForbidden)
|
||||
val errorFactory = if (emptyIntersectionTypeInfo.kind.isDefinitelyEmpty() && isInferredEmptyIntersectionForbidden)
|
||||
::InferredEmptyIntersectionError
|
||||
else ::InferredEmptyIntersectionWarning
|
||||
|
||||
addError(errorFactory(upperTypes, variable, emptyIntersectionKind))
|
||||
addError(
|
||||
errorFactory(upperTypes.toList(), emptyIntersectionTypeInfo.casingTypes.toList(), variable, emptyIntersectionTypeInfo.kind)
|
||||
)
|
||||
}
|
||||
|
||||
private fun checkMissedConstraints() {
|
||||
|
||||
+4
-3
@@ -67,10 +67,11 @@ class ClassicTypeSystemContextForCS(
|
||||
}
|
||||
|
||||
override fun TypeSubstitutorMarker.safeSubstitute(type: KotlinTypeMarker): KotlinTypeMarker {
|
||||
require(type is UnwrappedType, type::errorMessage)
|
||||
require(type is KotlinType, type::errorMessage)
|
||||
val unwrappedType = type.unwrap()
|
||||
return when (this) {
|
||||
is NewTypeSubstitutor -> safeSubstitute(type)
|
||||
is TypeSubstitutor -> safeSubstitute(type, Variance.INVARIANT)
|
||||
is NewTypeSubstitutor -> safeSubstitute(unwrappedType)
|
||||
is TypeSubstitutor -> safeSubstitute(unwrappedType, Variance.INVARIANT)
|
||||
else -> error(this.errorMessage())
|
||||
}
|
||||
}
|
||||
|
||||
+9
-3
@@ -902,15 +902,21 @@ internal object CheckIncompatibleTypeVariableUpperBounds : ResolutionPart() {
|
||||
continue
|
||||
}
|
||||
else -> {
|
||||
val emptyIntersectionKind = constraintSystem.getEmptyIntersectionTypeKind(upperTypes).takeIf { it.isDefinitelyEmpty() }
|
||||
?: continue
|
||||
val emptyIntersectionTypeInfo = constraintSystem.getEmptyIntersectionTypeKind(upperTypes) ?: continue
|
||||
val isInferredEmptyIntersectionForbidden = callComponents.languageVersionSettings.supportsFeature(
|
||||
LanguageFeature.ForbidInferringTypeVariablesIntoEmptyIntersection
|
||||
)
|
||||
val errorFactory =
|
||||
if (isInferredEmptyIntersectionForbidden) ::InferredEmptyIntersectionError else ::InferredEmptyIntersectionWarning
|
||||
|
||||
addError(errorFactory(upperTypes, variableWithConstraints.typeVariable, emptyIntersectionKind))
|
||||
addError(
|
||||
errorFactory(
|
||||
upperTypes,
|
||||
emptyIntersectionTypeInfo.casingTypes.toList(),
|
||||
variableWithConstraints.typeVariable,
|
||||
emptyIntersectionTypeInfo.kind
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/kt45461.kt:5:25: warning: parameter 'foo' is never used
|
||||
fun <S : T> takeFoo(foo: Foo<in S>) {}
|
||||
^
|
||||
/kt45461.kt:10:19: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (multiple incompatible classes): String, Int. This will become an error in Kotlin 1.9
|
||||
/kt45461.kt:10:19: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: String, Int (multiple incompatible classes). This will become an error in Kotlin 1.9
|
||||
Bar<String>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/kt45461_10.kt:7:25: warning: parameter 'foo' is never used
|
||||
fun <S : T> takeFoo(foo: Foo<in S>) {}
|
||||
^
|
||||
/kt45461_10.kt:16:21: warning: type argument for a type parameter S has possible incompatible upper bounds: Out<Int>, K
|
||||
/kt45461_10.kt:16:21: warning: type argument for a type parameter S has possible incompatible upper bounds: Out<Int>, K (final class and interface: Int, A)
|
||||
Bar<Out<Int>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/kt45461_12.kt:5:25: warning: parameter 'foo' is never used
|
||||
fun <S : T> takeFoo(foo: Foo<in S>) {}
|
||||
^
|
||||
/kt45461_12.kt:12:19: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (multiple incompatible classes): String, K. This will become an error in Kotlin 1.9
|
||||
/kt45461_12.kt:12:19: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: String, K (multiple incompatible classes: String, Number). This will become an error in Kotlin 1.9
|
||||
Bar<String>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/kt45461_13.kt:7:25: warning: parameter 'foo' is never used
|
||||
fun <S : T> takeFoo(foo: Foo<in S>) {}
|
||||
^
|
||||
/kt45461_13.kt:16:24: warning: type argument for a type parameter S has possible incompatible upper bounds: Out<String>, K
|
||||
/kt45461_13.kt:16:24: warning: type argument for a type parameter S has possible incompatible upper bounds: Out<String>, K (final class and interface: String, A)
|
||||
Bar<Out<String>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/kt45461_15.kt:5:25: warning: parameter 'foo' is never used
|
||||
fun <S : T> takeFoo(foo: Foo<in S>) {}
|
||||
^
|
||||
/kt45461_15.kt:14:21: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (incompatible type arguments): Inv<Int>, K. This will become an error in Kotlin 1.9
|
||||
/kt45461_15.kt:14:21: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: Inv<Int>, K (incompatible type arguments: Int, {A & Number}). This will become an error in Kotlin 1.9
|
||||
Bar<Inv<Int>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/kt45461_19.kt:5:25: warning: parameter 'foo' is never used
|
||||
fun <S : T> takeFoo(foo: Foo<in S>) {}
|
||||
^
|
||||
/kt45461_19.kt:13:26: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (incompatible type arguments): Out<Inv<Int>>, K. This will become an error in Kotlin 1.9
|
||||
/kt45461_19.kt:13:26: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: Out<Inv<Int>>, K (incompatible type arguments: Int, Number). This will become an error in Kotlin 1.9
|
||||
Bar<Out<Inv<Int>>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
/kt45461_2.kt:8:10: warning: 'Int' is a final type, and thus a value of the type parameter is predetermined
|
||||
fun <K : Int> main() {
|
||||
^
|
||||
/kt45461_2.kt:10:19: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (multiple incompatible classes): String, K. This will become an error in Kotlin 1.9
|
||||
/kt45461_2.kt:10:19: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: String, K (multiple incompatible classes: String, Int). This will become an error in Kotlin 1.9
|
||||
Bar<String>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/kt45461_21.kt:5:25: warning: parameter 'foo' is never used
|
||||
fun <S : T> takeFoo(foo: Foo<in S>) {}
|
||||
^
|
||||
/kt45461_21.kt:13:25: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (incompatible type arguments): In<Inv<Int>>, K. This will become an error in Kotlin 1.9
|
||||
/kt45461_21.kt:13:25: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: In<Inv<Int>>, K (incompatible type arguments: Int, Number). This will become an error in Kotlin 1.9
|
||||
Bar<In<Inv<Int>>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@
|
||||
/kt45461_24.kt:10:10: warning: 'Inv<out Inv<out Int>>' is a final type, and thus a value of the type parameter is predetermined
|
||||
fun <K : Inv<out Inv<out Int>>> main() {
|
||||
^
|
||||
/kt45461_24.kt:12:35: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (incompatible type arguments): Inv<in Inv<in Number>>, K. This will become an error in Kotlin 1.9
|
||||
/kt45461_24.kt:12:35: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: Inv<in Inv<in Number>>, K (incompatible type arguments: Number, Int). This will become an error in Kotlin 1.9
|
||||
Bar<Inv<in Inv<in Number>>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
/kt45461_25.kt:11:34: error: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (multiple incompatible classes): String, K, Float
|
||||
/kt45461_25.kt:11:34: error: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: String, K, Float (multiple incompatible classes: String, Int)
|
||||
val x: Float = Bar<String>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ class Bar<T> {
|
||||
|
||||
fun <K : L, L : N, N: <!FINAL_UPPER_BOUND!>Int<!>> main() {
|
||||
val foo = Foo<K>()
|
||||
val x: Float = Bar<String>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION("S; kotlin/String, K; multiple incompatible classes")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
val x: Float = Bar<String>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION("S; kotlin/String, K; multiple incompatible classes; : kotlin/String, kotlin/Int")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ class Bar<T> {
|
||||
|
||||
fun <K : L, L : N, N: <!FINAL_UPPER_BOUND!>Int<!>> main() {
|
||||
val foo = Foo<K>()
|
||||
val x: Float = Bar<String>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERROR("S; String, K, Float; (multiple incompatible classes)")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
val x: Float = Bar<String>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERROR("S; String, K, Float; multiple incompatible classes; : String, Int")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/kt45461_26.kt:13:44: error: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (multiple incompatible classes): Out<String>, K, Out<Float>
|
||||
/kt45461_26.kt:13:44: error: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: Out<String>, K, Out<Float> (multiple incompatible classes: String, Int)
|
||||
val x: Out<Float> = Bar<Out<String>>().takeFoo(foo)
|
||||
^
|
||||
|
||||
|
||||
+1
-1
@@ -10,5 +10,5 @@ class Out<out K>
|
||||
|
||||
fun <K : L, L : N, N: <!FINAL_UPPER_BOUND!>Out<Int><!>> main() {
|
||||
val foo = Foo<K>()
|
||||
val x: Out<Float> = Bar<Out<String>>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION("S; Out<kotlin/String>, K; multiple incompatible classes")!>takeFoo<!>(foo)
|
||||
val x: Out<Float> = Bar<Out<String>>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION("S; Out<kotlin/String>, K; multiple incompatible classes; : kotlin/String, kotlin/Int")!>takeFoo<!>(foo)
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,5 +10,5 @@ class Out<out K>
|
||||
|
||||
fun <K : L, L : N, N: <!FINAL_UPPER_BOUND!>Out<Int><!>> main() {
|
||||
val foo = Foo<K>()
|
||||
val x: Out<Float> = Bar<Out<String>>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERROR("S; Out<String>, K, Out<Float>; (multiple incompatible classes)")!>takeFoo<!>(foo)
|
||||
val x: Out<Float> = Bar<Out<String>>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERROR("S; Out<String>, K, Out<Float>; multiple incompatible classes; : String, Int")!>takeFoo<!>(foo)
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,5 +11,5 @@ interface B : A<Int>
|
||||
|
||||
fun <K : Out<A<String>>> main() {
|
||||
val foo = Foo<K>()
|
||||
Bar<Out<B>>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING("S; Out<B>, K; (incompatible supertypes)")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
Bar<Out<B>>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING("S; Out<B>, K; incompatible supertypes; : A<Int>, A<String>")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,5 +11,5 @@ class B : A<Int>
|
||||
|
||||
fun <K : Out<A<String>>> main() {
|
||||
val foo = Foo<K>()
|
||||
Bar<Out<B>>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING("S; Out<B>, K; (incompatible supertypes)")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
Bar<Out<B>>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING("S; Out<B>, K; incompatible supertypes; : A<Int>, A<String>")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/kt45461_5.kt:5:25: warning: parameter 'foo' is never used
|
||||
fun <S : T> takeFoo(foo: Foo<in S>) {}
|
||||
^
|
||||
/kt45461_5.kt:10:19: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (multiple incompatible classes): String, K. This will become an error in Kotlin 1.9
|
||||
/kt45461_5.kt:10:19: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: String, K (multiple incompatible classes: String, Number). This will become an error in Kotlin 1.9
|
||||
Bar<String>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@
|
||||
/kt45461_8.kt:10:28: warning: 'Int' is a final type, and thus a value of the type parameter is predetermined
|
||||
fun <K : Inv<L>, L : N, N: Int> main() {
|
||||
^
|
||||
/kt45461_8.kt:12:24: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (incompatible type arguments): Inv<Number>, K. This will become an error in Kotlin 1.9
|
||||
/kt45461_8.kt:12:24: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: Inv<Number>, K (incompatible type arguments: Number, Int). This will become an error in Kotlin 1.9
|
||||
Bar<Inv<Number>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/kt45461_9.kt:5:25: warning: parameter 'foo' is never used
|
||||
fun <S : T> takeFoo(foo: Foo<in S>) {}
|
||||
^
|
||||
/kt45461_9.kt:12:21: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds (incompatible type arguments): Inv<Int>, Inv<Number>. This will become an error in Kotlin 1.9
|
||||
/kt45461_9.kt:12:21: warning: type argument for a type parameter S can't be inferred because it has incompatible upper bounds: Inv<Int>, Inv<Number> (incompatible type arguments: Int, Number). This will become an error in Kotlin 1.9
|
||||
Bar<Inv<Int>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31
|
||||
^
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
/kt48765.kt:4:52: warning: parameter 'x2' is never used
|
||||
fun <T1: Number, T2: A<Float, T1>> foo(x1: T2, x2: T1) {}
|
||||
^
|
||||
/kt48765.kt:8:13: warning: type argument for a type parameter T can't be inferred because it has incompatible upper bounds (multiple incompatible classes): String, Number. This will become an error in Kotlin 1.9
|
||||
/kt48765.kt:8:13: warning: type argument for a type parameter T can't be inferred because it has incompatible upper bounds: String, Number (multiple incompatible classes). This will become an error in Kotlin 1.9
|
||||
B().foo(x, foo())
|
||||
^
|
||||
/kt48765.kt:12:9: warning: 'String' is a final type, and thus a value of the type parameter is predetermined
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/kt48935.kt:7:35: warning: parameter 'func' is never used
|
||||
fun <T, V> exampleGenericFunction(func: V) where T: Base, V: (T) -> Unit {
|
||||
^
|
||||
/kt48935.kt:13:5: warning: type argument for a type parameter T has possible incompatible upper bounds: Base, DoesNotImplementBase
|
||||
/kt48935.kt:13:5: warning: type argument for a type parameter T has possible incompatible upper bounds: Base, DoesNotImplementBase (final class and interface)
|
||||
exampleGenericFunction(func) // expected this to be a compilation error as the T: Base constraint should not be satisfied
|
||||
^
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/kt49661.kt:10:5: warning: type argument for a type parameter T can't be inferred because it has incompatible upper bounds (multiple incompatible classes): Foo, Int. This will become an error in Kotlin 1.9
|
||||
/kt49661.kt:10:5: warning: type argument for a type parameter T can't be inferred because it has incompatible upper bounds: Foo, Int (multiple incompatible classes). This will become an error in Kotlin 1.9
|
||||
f<Int> { g() }
|
||||
^
|
||||
|
||||
|
||||
+1
-1
@@ -7,6 +7,6 @@ fun <V> genericIn(x: In<V>) {}
|
||||
/selectFromCovariantAndContravariantTypes.kt:13:20: warning: parameter 'x' is never used
|
||||
fun <V> genericOut(x: Out<V>) {}
|
||||
^
|
||||
/selectFromCovariantAndContravariantTypes.kt:16:5: warning: type argument for a type parameter V can't be inferred because it has incompatible upper bounds (multiple incompatible classes): A, B. This will become an error in Kotlin 1.9
|
||||
/selectFromCovariantAndContravariantTypes.kt:16:5: warning: type argument for a type parameter V can't be inferred because it has incompatible upper bounds: A, B (multiple incompatible classes). This will become an error in Kotlin 1.9
|
||||
genericIn(select(a, b))
|
||||
^
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ val a1: A = select(
|
||||
{ a: Int -> myPrint(a + this.length + 2) }
|
||||
)
|
||||
|
||||
val a2 = <!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("")!>select<!>(
|
||||
val a2 = <!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("TypeVariable(_RP1); CharSequence, Int; final class and interface")!>select<!>(
|
||||
{ a: Int -> myPrint(a + this.<!UNRESOLVED_REFERENCE!>length<!> <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> 1) },
|
||||
fun CharSequence.(a: Int) { myPrint(a + this.length + 2) },
|
||||
{ a: Int -> myPrint(a + this.<!UNRESOLVED_REFERENCE!>length<!> <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> 3) }
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ fun testElvis(a: Int?, b: Int?) {
|
||||
if (a != null) {
|
||||
doInt(b ?: a)
|
||||
}
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a/A, kotlin/Int")!>doList<!>(getList() ?: emptyListOfA()) //should be an error
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a/A, kotlin/Int; final class and interface")!>doList<!>(getList() ?: emptyListOfA()) //should be an error
|
||||
doList(getList() ?: strangeList { doInt(it) }) //lambda was not analyzed
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ fun testElvis(a: Int?, b: Int?) {
|
||||
if (a != null) {
|
||||
doInt(b ?: <!DEBUG_INFO_SMARTCAST!>a<!>)
|
||||
}
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("")!>doList<!>(getList() ?: emptyListOfA()) //should be an error
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; A, Int; final class and interface")!>doList<!>(getList() ?: emptyListOfA()) //should be an error
|
||||
doList(getList() ?: strangeList { doInt(it) }) //lambda was not analyzed
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ fun <T: A> emptyNullableListOfA(): List<T>? = null
|
||||
//-------------------------------
|
||||
|
||||
fun testExclExcl() {
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a/A, kotlin/Int")!>doList<!>(emptyNullableListOfA()!!) //should be an error here
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a/A, kotlin/Int; final class and interface")!>doList<!>(emptyNullableListOfA()!!) //should be an error here
|
||||
val l: List<Int> = <!INITIALIZER_TYPE_MISMATCH, NEW_INFERENCE_ERROR!>id(emptyNullableListOfA()!!)<!>
|
||||
|
||||
doList(strangeNullableList { doInt(it) }!!) //lambda should be analyzed (at completion phase)
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ fun <T: A> emptyNullableListOfA(): List<T>? = null
|
||||
//-------------------------------
|
||||
|
||||
fun testExclExcl() {
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("")!>doList<!>(emptyNullableListOfA()!!) //should be an error here
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; A, Int; final class and interface")!>doList<!>(emptyNullableListOfA()!!) //should be an error here
|
||||
val l: List<Int> = <!TYPE_MISMATCH!><!TYPE_MISMATCH!>id<!>(<!TYPE_MISMATCH!>emptyNullableListOfA<!>()<!TYPE_MISMATCH!>!!<!>)<!>
|
||||
|
||||
doList(strangeNullableList { doInt(it) }!!) //lambda should be analyzed (at completion phase)
|
||||
|
||||
Reference in New Issue
Block a user