Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.kt
T
Pavel Kirpichenkov 710659324c [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
2020-07-22 11:41:42 +03:00

9 lines
266 B
Kotlin
Vendored

// !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<!>("")
}
}