[FIR] Ensure K2 reports redundant diagnostics for default values

This commit is contained in:
Nikolay Lunyak
2023-09-18 13:33:50 +03:00
committed by Space Team
parent 8755cf75ac
commit 76fa812949
7 changed files with 60 additions and 0 deletions
@@ -0,0 +1,15 @@
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>()