|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConstraintSystemStatus
| Method Summary | |
|---|---|
boolean |
hasConflictingConstraints()
Returns true if type constraints for some type variable are contradicting. |
boolean |
hasContradiction()
Return true if constraint system has no contradiction (it can be not successful because of the lack of information for a type variable). |
boolean |
hasErrorInConstrainingTypes()
Returns true if there is an error in constraining types. |
boolean |
hasOnlyErrorsFromPosition(ConstraintPosition constraintPosition)
Returns true if there is type constructor mismatch only in constraintPosition or constraint system is successful without constraints from this position. |
boolean |
hasTypeConstructorMismatch()
Returns true if some constraint cannot be processed because of type constructor mismatch. |
boolean |
hasTypeConstructorMismatchAt(ConstraintPosition constraintPosition)
Returns true if there is type constructor mismatch error at a specific constraintPosition. |
boolean |
hasUnknownParameters()
Returns true if there is no information for some registered type variable. |
boolean |
hasViolatedUpperBound()
Returns true if contradiction of type constraints comes from declared bounds for type parameters. |
boolean |
isSuccessful()
Returns true if constraint system has a solution (has no contradiction and has enough information to infer each registered type variable). |
| Method Detail |
|---|
boolean isSuccessful()
boolean hasContradiction()
boolean hasConflictingConstraints()
fun <R> foo(r: R, t: java.util.List<R>) {} in invocation foo(1, arrayList("s"))
type variable R has two conflicting constraints:
- "R is a supertype of Int"
- "List<R> is a supertype of List<String>" which leads to "R is equal to String"
boolean hasViolatedUpperBound()
fun <R: Any> foo(r: R) {} in invocation foo(null)
upper bounds Any for type parameter R is violated.
It's the special case of 'hasConflictingConstraints' case.
boolean hasUnknownParameters()
fun <E> newList()in invocation "val nl = newList()" there is no information to infer type variable E.
boolean hasTypeConstructorMismatch()
fun <R> foo(t: List<R>) {} in invocation foo(hashSet("s"))
there is type constructor mismatch: "HashSet<String> cannot be a subtype of List<R>".
boolean hasTypeConstructorMismatchAt(@NotNull
ConstraintPosition constraintPosition)
constraintPosition.
For example, for fun <R> foo(t: List<R>) {} in invocation foo(hashSet("s"))
there is type constructor mismatch: "HashSet<String> cannot be a subtype of List<R>"
at a constraint position ConstraintPosition.getValueParameterPosition(0).
boolean hasOnlyErrorsFromPosition(ConstraintPosition constraintPosition)
boolean hasErrorInConstrainingTypes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||