FirDefaultParametersResolver: process imported from objects properly
#KT-49083 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
c5a4a5de42
commit
09bc729b0e
Vendored
+22
@@ -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))
|
||||
}
|
||||
Vendored
+11
@@ -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'
|
||||
}
|
||||
Reference in New Issue
Block a user