[NI] Capture from supertypes of type parameter.

This works by accident in OI, so this should be supported by new inference.
This commit is contained in:
Stanislav Erokhin
2017-04-06 22:17:18 +03:00
parent c4ddc7a3a6
commit b4bf534d29
5 changed files with 69 additions and 4 deletions
@@ -391,6 +391,9 @@ object NullabilityChecker {
}
fun UnwrappedType.hasSupertypeWithGivenTypeConstructor(typeConstructor: TypeConstructor) =
TypeCheckerContext(false).anySupertype(lowerIfFlexible(), { it.constructor == typeConstructor }, { SupertypesPolicy.LowerIfFlexible })
/**
* ClassType means that type constructor for this type is type for real class or interface
*/