org.jetbrains.kotlin.types
Class TypeUnifier

java.lang.Object
  extended by org.jetbrains.kotlin.types.TypeUnifier

public class TypeUnifier
extends java.lang.Object


Nested Class Summary
static interface TypeUnifier.UnificationResult
           
 
Constructor Summary
TypeUnifier()
           
 
Method Summary
static TypeUnifier.UnificationResult unify(TypeProjection knownProjection, TypeProjection projectWithVariables, com.google.common.base.Predicate<TypeConstructor> isVariable)
          Finds a substitution S that turns projectWithVariables to knownProjection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeUnifier

public TypeUnifier()
Method Detail

unify

@NotNull
public static TypeUnifier.UnificationResult unify(@NotNull
                                                          TypeProjection knownProjection,
                                                          @NotNull
                                                          TypeProjection projectWithVariables,
                                                          @NotNull
                                                          com.google.common.base.Predicate<TypeConstructor> isVariable)
Finds a substitution S that turns projectWithVariables to knownProjection. Example: known = List withVariables = List variables = {X} result = X -> String Only types accepted by isVariable are considered variables.