8e8a6e6108
If we implement default function with default parameters in inline
class, the receivers will be added to parameter list
(see ac7538a269). But since they
are not present in source parameters, we should not count them when we
compute mask for default parameters.
#KT-49977 Fixed
29 lines
616 B
Kotlin
Vendored
29 lines
616 B
Kotlin
Vendored
// WITH_STDLIB
|
|
|
|
// TARGET_BACKEND: JVM
|
|
// IGNORE_BACKEND: JVM
|
|
// JVM_TARGET: 1.8
|
|
|
|
interface Path {
|
|
fun dispatch(maxDepth: Int = 42)
|
|
fun Int.extension(maxDepth: Int = 42)
|
|
}
|
|
|
|
@JvmInline
|
|
value class RealPath(val x: Int) : Path {
|
|
override fun dispatch(maxDepth: Int) = Unit
|
|
|
|
fun childrenDispatch(recursively: Boolean): Unit =
|
|
if (recursively) dispatch() else dispatch()
|
|
|
|
override fun Int.extension(maxDepth: Int) = Unit
|
|
|
|
fun Int.childrenExtension(recursively: Boolean): Unit =
|
|
if (recursively) extension() else extension()
|
|
}
|
|
|
|
fun box(): String {
|
|
RealPath(1)
|
|
return "OK"
|
|
}
|