FirDefaultParametersResolver: process imported from objects properly

#KT-49083 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-10-13 16:48:22 +03:00
committed by TeamCityServer
parent c5a4a5de42
commit 09bc729b0e
8 changed files with 79 additions and 15 deletions
@@ -0,0 +1,22 @@
FILE: defaultParameterFromBase.kt
public open class Base : R|kotlin/Any| {
public constructor(): R|Base| {
super<R|kotlin/Any|>()
}
public open fun foo(arg: R|kotlin/Int|, def: R|kotlin/String| = String()): R|kotlin/Unit| {
}
}
public final object Derived : R|Base| {
private constructor(): R|Derived| {
super<R|Base|>()
}
public final override fun foo(arg: R|kotlin/Int|, def: R|kotlin/String|): R|kotlin/Unit| {
}
}
public final fun test(): R|kotlin/Unit| {
Q|Derived|.R|/Derived.foo|(Int(42))
}
@@ -0,0 +1,11 @@
import Derived.foo
open class Base {
open fun foo(arg: Int, def: String = "") {}
}
object Derived : Base() {
override fun foo(arg: Int, def: String) {}
}
fun test() {
foo(42) // No value passed for parameter 'def'
}