Revert "[NI] Fix reporting smartcast diagnostics for intersection types"

This reverts commit 033d7262

That commit breaks bootstraping
This commit is contained in:
Dmitriy Novozhilov
2019-04-11 18:49:02 +03:00
parent 849d18669b
commit a92cf19641
15 changed files with 36 additions and 115 deletions
@@ -243,12 +243,3 @@ val TypeParameterDescriptor.representativeUpperBound: KotlinType
} ?: upperBounds.first()
}
fun KotlinType.expandIntersectionTypeIfNecessary(): Collection<KotlinType> {
if (constructor !is IntersectionTypeConstructor) return listOf(this)
val types = constructor.supertypes
return if (isMarkedNullable) {
types.map { it.makeNullable() }
} else {
types
}
}