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
24 lines
1.3 KiB
Plaintext
Vendored
24 lines
1.3 KiB
Plaintext
Vendored
FILE: default.kt
|
|
public final fun foo(first: R|kotlin/Int|, second: R|kotlin/Double| = Double(3.14), third: R|kotlin/Boolean| = Boolean(false)): R|kotlin/Unit| {
|
|
}
|
|
public final fun bar(first: R|kotlin/Int|, second: R|kotlin/Double| = Double(2.71), third: R|kotlin/Boolean|, fourth: R|kotlin/String| = String()): R|kotlin/Unit| {
|
|
}
|
|
public final fun baz(x: R|kotlin/Int|, vararg y: R|kotlin/Array<out kotlin/String>|, z: R|kotlin/Boolean| = Boolean(false)): R|kotlin/Unit| {
|
|
}
|
|
public final fun test(): R|kotlin/Unit| {
|
|
R|/foo|(Int(1))
|
|
R|/foo|(Int(1), Double(2.0))
|
|
R|/foo|(Int(1), Double(2.0), Boolean(true))
|
|
R|/foo|(Int(1), Boolean(true))
|
|
R|/foo<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /foo>#|()
|
|
R|/foo<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /foo>#|(Int(0), Double(0.0), Boolean(false), String())
|
|
R|/bar|(Int(1), Boolean(true))
|
|
R|/bar|(Int(1), Double(2.0), Boolean(true))
|
|
R|/bar|(Int(1), Double(2.0), Boolean(true), String(my))
|
|
R|/bar<Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): /bar>#|(Int(1), Boolean(true))
|
|
R|/baz|(Int(1))
|
|
R|/baz|(Int(1), vararg(String(my), String(yours)))
|
|
R|/baz|(Int(1), Boolean(true))
|
|
R|/baz<Inapplicable(INAPPLICABLE): /baz>#|(Int(0), String(), Boolean(false))
|
|
}
|