Minor, drop HTML and improve language in ConstraintSystem kdoc

This commit is contained in:
Alexander Udalov
2015-10-27 17:14:55 +03:00
parent 5fc14e0224
commit c5ec3b0f6f
@@ -23,7 +23,6 @@ import org.jetbrains.kotlin.types.TypeSubstitutor
import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.types.Variance
public interface ConstraintSystem { public interface ConstraintSystem {
/** /**
* Registers variables in a constraint system. * Registers variables in a constraint system.
* The type variables for the corresponding function are local, the type variables of inner arguments calls are non-local. * The type variables for the corresponding function are local, the type variables of inner arguments calls are non-local.
@@ -41,50 +40,50 @@ public interface ConstraintSystem {
public fun getTypeVariables(): Set<TypeParameterDescriptor> public fun getTypeVariables(): Set<TypeParameterDescriptor>
/** /**
* Adds a constraint that the constraining type is a subtype of the subject type.<p/> * Adds a constraint that the constraining type is a subtype of the subject type.
* Asserts that only subject type may contain registered type variables. <p/> * Asserts that only subject type may contain registered type variables.
* *
* For example, for {@code "fun <T> id(t: T) {}"} to infer <tt>T</tt> in invocation <tt>"id(1)"</tt> * For example, for `fun <T> id(t: T) {}` to infer `T` in invocation `id(1)`
* should be generated a constraint <tt>"Int is a subtype of T"</tt> where T is a subject type, and Int is a constraining type. * the constraint "Int is a subtype of T" should be generated where T is a subject type, and Int is a constraining type.
*/ */
public fun addSubtypeConstraint(constrainingType: KotlinType?, subjectType: KotlinType, constraintPosition: ConstraintPosition) public fun addSubtypeConstraint(constrainingType: KotlinType?, subjectType: KotlinType, constraintPosition: ConstraintPosition)
/** /**
* Adds a constraint that the constraining type is a supertype of the subject type. <p/> * Adds a constraint that the constraining type is a supertype of the subject type.
* Asserts that only subject type may contain registered type variables. <p/> * Asserts that only subject type may contain registered type variables.
* *
* For example, for {@code "fun <T> create() : T"} to infer <tt>T</tt> in invocation <tt>"val i: Int = create()"</tt> * For example, for `fun <T> create(): T` to infer `T` in invocation `val i: Int = create()`
* should be generated a constraint <tt>"Int is a supertype of T"</tt> where T is a subject type, and Int is a constraining type. * the constraint "Int is a supertype of T" should be generated where T is a subject type, and Int is a constraining type.
*/ */
public fun addSupertypeConstraint(constrainingType: KotlinType?, subjectType: KotlinType, constraintPosition: ConstraintPosition) public fun addSupertypeConstraint(constrainingType: KotlinType?, subjectType: KotlinType, constraintPosition: ConstraintPosition)
public fun getStatus(): ConstraintSystemStatus public fun getStatus(): ConstraintSystemStatus
/** /**
* Returns the resulting type constraints of solving the constraint system for specific type variable. <p/> * Returns the resulting type constraints of solving the constraint system for specific type variable.
* Throws IllegalArgumentException if the type variable was not registered. * Throws IllegalArgumentException if the type variable was not registered.
*/ */
public fun getTypeBounds(typeVariable: TypeParameterDescriptor): TypeBounds public fun getTypeBounds(typeVariable: TypeParameterDescriptor): TypeBounds
/** /**
* Returns a result of solving the constraint system (mapping from the type variable to the resulting type projection). <p/> * Returns the result of solving the constraint system (mapping from the type variable to the resulting type projection).
* In the resulting substitution should be concerned: <p/> * In the resulting substitution the following should be of concern:
* - type constraints <p/> * - type constraints
* - variance of the type variable // not implemented yet <p/> * - variance of the type variable // not implemented yet
* - type parameter bounds (that can bind type variables with each other). // not implemented yet * - type parameter bounds (that can bind type variables with each other) // not implemented yet
* If the addition of the 'expected type' constraint made the system fail, * If the addition of the 'expected type' constraint made the system fail,
* this constraint is not included in the resulting substitution. * this constraint is not included in the resulting substitution.
*/ */
public fun getResultingSubstitutor(): TypeSubstitutor public fun getResultingSubstitutor(): TypeSubstitutor
/** /**
* Returns a current result of solving the constraint system (mapping from the type variable to the resulting type projection). * Returns the current result of solving the constraint system (mapping from the type variable to the resulting type projection).
* If there is no information for type parameter, returns type projection for DONT_CARE type. * If there is no information for type parameter, returns type projection for DONT_CARE type.
*/ */
public fun getCurrentSubstitutor(): TypeSubstitutor public fun getCurrentSubstitutor(): TypeSubstitutor
/** /**
* Returns a substitution only for type parameters that have result values, otherwise returns a type parameter itself. * Returns the substitution only for type parameters that have result values, otherwise returns the type parameter itself.
*/ */
public fun getPartialSubstitutor(): TypeSubstitutor public fun getPartialSubstitutor(): TypeSubstitutor
} }