[FIR] Consider expect declarations in defaults arguments inheritance checker

Actual functions cannot declare default values for parameters
Corresponding expect function should be checked instead
This commit is contained in:
Dmitriy Novozhilov
2024-01-10 14:08:54 +02:00
committed by Nikolay Lunyak
parent 2982f548d4
commit e8f5e35a86
2 changed files with 14 additions and 6 deletions
@@ -16,8 +16,8 @@ expect interface I2 {
override fun foo(<!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES!>x: Int<!>)
}
interface CommonInterface : I1, I2 {
override fun foo(x: Int)
<!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE!>interface CommonInterface<!> : I1, I2 {
override fun foo(<!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES!>x: Int<!>)
}
// MODULE: m1-jvm()()(m1-common)
@@ -33,6 +33,6 @@ actual interface I2 {
actual fun bar(x: Int)
}
actual interface ExpectInterface : I1, I2 {
actual override fun foo(x: Int)
<!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE!>actual interface ExpectInterface<!> : I1, I2 {
actual override fun foo(<!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES!>x: Int<!>)
}