Prohibit constructing projected types via type aliases.
This commit is contained in:
@@ -203,3 +203,8 @@ fun KotlinType.requiresTypeAliasExpansion(): Boolean =
|
||||
} ?: false
|
||||
}
|
||||
|
||||
fun KotlinType.containsTypeProjectionsInTopLevelArguments(): Boolean {
|
||||
if (isError) return false
|
||||
val possiblyInnerType = buildPossiblyInnerType() ?: return false
|
||||
return possiblyInnerType.arguments.any { it.isStarProjection || it.projectionKind != Variance.INVARIANT }
|
||||
}
|
||||
Reference in New Issue
Block a user