Inline and move out utilities from ConstraintSystem

This commit is contained in:
Alexander Udalov
2015-11-12 22:16:47 +03:00
parent d4664af4e5
commit 3e27fdb964
5 changed files with 24 additions and 18 deletions
@@ -143,7 +143,7 @@ class FuzzyType(
if (otherSubstitutedType.isError) return null
if (!substitutedType.checkInheritance(otherSubstitutedType)) return null
val substitution = constraintSystem.typeParameterDescriptors.toMap({ it.typeConstructor }) {
val substitution = constraintSystem.typeVariables.map { it.originalTypeParameter }.toMap({ it.typeConstructor }) {
val type = it.defaultType
val solution = substitutor.substitute(type, Variance.INVARIANT)
TypeProjectionImpl(if (solution != null && !ErrorUtils.containsUninferredParameter(solution)) solution else type)