Specify type explicitly: do not consider star projection arguments in KotlinType.isFlexibleRecursive() #KT-13055 Fixed

(cherry picked from commit 828f4bf)
This commit is contained in:
Mikhail Glukhikh
2016-07-11 18:47:19 +03:00
committed by Mikhail Glukhikh
parent 51ccfc120e
commit b675b49daf
2 changed files with 8 additions and 1 deletions
@@ -51,7 +51,7 @@ class SpecifyTypeExplicitlyIntention :
private fun KotlinType.isFlexibleRecursive(): Boolean {
if (isFlexible()) return true
return arguments.any { it.type.isFlexibleRecursive() }
return arguments.any { !it.isStarProjection && it.type.isFlexibleRecursive() }
}
fun dangerousFlexibleTypeOrNull(declaration: KtCallableDeclaration, publicAPIOnly: Boolean): KotlinType? {