[NI] Fix common supertype of types with error supertypes

Enable check for error supertypes during CST calculation in classic type system context.
Cyclic upper bound + known type parameters of superclasses may create non-error types
with error supertypes. Such types don't have common constructors with other normal types
and cause assertion errors during intersection.

^KT-36951 Fixed
This commit is contained in:
Pavel Kirpichenkov
2020-07-20 14:05:58 +03:00
parent 95cc35f22e
commit 710659324c
14 changed files with 127 additions and 5 deletions
@@ -0,0 +1,8 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Base<T : T> : HashSet<T>() {
fun foo() {
super.remove("")
}
}