[NI] Initial support of "not enough information" diagnostic
#KT-30590 In Progress
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@ class KotlinConstraintSystemCompleter(
|
||||
fixVariable(c, topLevelType, variableWithConstraints, postponedKtPrimitives)
|
||||
|
||||
if (!variableForFixation.hasProperConstraint) {
|
||||
c.addError(NotEnoughInformationForTypeParameter(variableWithConstraints.typeVariable))
|
||||
c.addError(NotEnoughInformationForTypeParameter(variableWithConstraints.typeVariable, topLevelAtoms.first()))
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
+4
-1
@@ -101,7 +101,10 @@ class CapturedTypeFromSubtyping(
|
||||
val position: ConstraintPosition
|
||||
) : ConstraintSystemCallDiagnostic(INAPPLICABLE)
|
||||
|
||||
class NotEnoughInformationForTypeParameter(val typeVariable: TypeVariableMarker) : ConstraintSystemCallDiagnostic(INAPPLICABLE)
|
||||
class NotEnoughInformationForTypeParameter(
|
||||
val typeVariable: TypeVariableMarker,
|
||||
val resolvedAtom: ResolvedAtom
|
||||
) : ConstraintSystemCallDiagnostic(INAPPLICABLE)
|
||||
|
||||
class ConstrainingTypeIsError(
|
||||
val typeVariable: TypeVariableMarker,
|
||||
|
||||
Reference in New Issue
Block a user