[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:
@@ -0,0 +1,8 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class Base<T : <!CYCLIC_GENERIC_UPPER_BOUND!>T<!>> : HashSet<T>() {
|
||||
fun foo() {
|
||||
<!SUPER_CANT_BE_EXTENSION_RECEIVER!>super<!>.<!TYPE_INFERENCE_ONLY_INPUT_TYPES_WARNING!>remove<!>("")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user