Files
kotlin-fork/compiler/testData/diagnostics/tests/override/MultipleDefaultsAndSubstitutionOverrides.kt
T
Nikolay Lunyak 2801db0e59 [FIR] Unwrap substitution overrides for multiple default values
Otherwise, duplicate diagnostics may be reported on
subtypes of the type that actually declares the
problematic override.
2023-09-21 07:48:31 +00:00

17 lines
297 B
Kotlin
Vendored

// FIR_IDENTICAL
interface A<T> {
fun foo(x: Int = 42): Int
}
open class B<K> {
fun foo(x: Int = 239) = x
}
interface C<E> {
fun foo(x: Int): Int
}
open <!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE!>class Z<!><R> : A<R>, B<R>(), C<R>
class N<W> : Z<W>()