8443daf78d
They are mostly necessary for argument mapping during resolution. To support a couple checkers, we transform named args for varargs into "fake" spread expressions. Other than that, named arguments aren't needed for anything and often lead to bugs where we forget to unwrap them for something, so it's better to get rid of them. #KT-66124
30 lines
1.0 KiB
Plaintext
Vendored
30 lines
1.0 KiB
Plaintext
Vendored
FILE: defaultFromOverrides.kt
|
|
public abstract interface I1 : R|kotlin/Any| {
|
|
public abstract fun foo(x: R|kotlin/Int| = Int(1)): R|kotlin/Unit|
|
|
|
|
}
|
|
public abstract interface I2 : R|kotlin/Any| {
|
|
public abstract fun bar(x: R|kotlin/String| = String(), y: R|kotlin/Int|): R|kotlin/Unit|
|
|
|
|
}
|
|
public final class A : R|I1|, R|I2| {
|
|
public constructor(): R|A| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public open override fun foo(x: R|kotlin/Int|): R|kotlin/Unit| {
|
|
}
|
|
|
|
public open override fun bar(x: R|kotlin/String|, y: R|kotlin/Int|): R|kotlin/Unit| {
|
|
}
|
|
|
|
}
|
|
public final fun foo(a: R|A|): R|kotlin/Unit| {
|
|
R|<local>/a|.R|/A.foo|()
|
|
R|<local>/a|.R|/A.foo|(Int(1))
|
|
R|<local>/a|.R|/A.bar<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /A.bar>#|()
|
|
R|<local>/a|.R|/A.bar<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /A.bar>#|(String())
|
|
R|<local>/a|.R|/A.bar|(Int(1))
|
|
R|<local>/a|.R|/A.bar|(String(), Int(2))
|
|
}
|