Do not look into captured star projection as types

This commit is contained in:
Denis Zharkov
2019-12-02 17:02:07 +03:00
parent 3634d80cae
commit 692442d7a2
3 changed files with 13 additions and 6 deletions
@@ -233,7 +233,8 @@ interface TypeSystemContext : TypeSystemOptimizationContext {
fun KotlinTypeMarker.isDynamic(): Boolean = asFlexibleType()?.asDynamicType() != null
fun KotlinTypeMarker.isCapturedDynamic(): Boolean =
asSimpleType()?.asCapturedType()?.typeConstructor()?.projection()?.getType()?.isDynamic() == true
asSimpleType()?.asCapturedType()?.typeConstructor()?.projection()?.takeUnless { it.isStarProjection() }
?.getType()?.isDynamic() == true
fun KotlinTypeMarker.isDefinitelyNotNullType(): Boolean = asSimpleType()?.asDefinitelyNotNullType() != null