Introduce specific error for calls which could be resolved only with unrestricted builder inference
^KT-47747 Fixed
This commit is contained in:
committed by
teamcityserver
parent
357fda2efa
commit
6a1ec92d39
+3
-1
@@ -241,7 +241,9 @@ class ConstraintSystemCompleter(private val components: BodyResolveComponents) {
|
||||
findResolvedAtomBy(typeVariable, topLevelAtoms) ?: topLevelAtoms.firstOrNull()
|
||||
|
||||
if (resolvedAtom != null) {
|
||||
c.addError(NotEnoughInformationForTypeParameter(typeVariable, resolvedAtom))
|
||||
c.addError(
|
||||
NotEnoughInformationForTypeParameter(typeVariable, resolvedAtom, c.couldBeResolvedWithUnrestrictedBuilderInference())
|
||||
)
|
||||
}
|
||||
|
||||
val resultErrorType = when (typeVariable) {
|
||||
|
||||
Reference in New Issue
Block a user