Removed method 'hasTypeConstructorMismatchAt' from status
Used ConstraintError's instead
This commit is contained in:
-3
@@ -71,9 +71,6 @@ public class ConstraintSystemImpl : ConstraintSystem {
|
||||
|
||||
override fun hasTypeConstructorMismatch() = errors.any { it is TypeConstructorMismatch }
|
||||
|
||||
override fun hasTypeConstructorMismatchAt(constraintPosition: ConstraintPosition) =
|
||||
errors.any { it is TypeConstructorMismatch && it.constraintPosition == constraintPosition }
|
||||
|
||||
override fun hasOnlyErrorsFromPosition(constraintPosition: ConstraintPosition): Boolean {
|
||||
if (isSuccessful()) return false
|
||||
if (filterConstraintsOut(constraintPosition).getStatus().isSuccessful()) return true
|
||||
|
||||
-9
@@ -65,15 +65,6 @@ public trait ConstraintSystemStatus {
|
||||
*/
|
||||
public fun hasTypeConstructorMismatch(): Boolean
|
||||
|
||||
/**
|
||||
* Returns <tt>true</tt> if there is type constructor mismatch error at a specific {@code constraintPosition}.
|
||||
*
|
||||
* For example, for <pre>fun <R> foo(t: List<R>) {}</pre> in invocation <tt>foo(hashSet("s"))</tt>
|
||||
* there is type constructor mismatch: <tt>"HashSet<String> cannot be a subtype of List<R>"</tt>
|
||||
* at a constraint position {@code ConstraintPosition.getValueParameterPosition(0)}.
|
||||
*/
|
||||
public fun hasTypeConstructorMismatchAt(constraintPosition: ConstraintPosition): Boolean
|
||||
|
||||
/**
|
||||
* Returns <tt>true</tt> if there is type constructor mismatch only in constraintPosition or
|
||||
* constraint system is successful without constraints from this position.
|
||||
|
||||
Reference in New Issue
Block a user