Report warning on generic type as argument for reified parameter

#KT-6484 Fixed
This commit is contained in:
Denis Zharkov
2016-01-19 10:31:26 +03:00
parent ae6c62ddff
commit 751f66c656
8 changed files with 44 additions and 1 deletions
@@ -67,6 +67,7 @@ fun KotlinType?.isArrayOfNothing(): Boolean {
fun KotlinType.isSubtypeOf(superType: KotlinType): Boolean = KotlinTypeChecker.DEFAULT.isSubtypeOf(this, superType)
fun KotlinType.cannotBeReified(): Boolean = KotlinBuiltIns.isNothingOrNullableNothing(this) || this.isDynamic()
fun KotlinType.unsafeAsReifiedArgument(): Boolean = arguments.any { !it.isStarProjection }
fun TypeProjection.substitute(doSubstitute: (KotlinType) -> KotlinType): TypeProjection {
return if (isStarProjection)