Not sure if this is the right channel for this, bu...
# compiler
e
Not sure if this is the right channel for this, but is there any way to force using parameter names when calling a function?
e
hack:
Copy code
sealed class OnlyNamedParametersMarker {
    internal object Instance : OnlyNamedParametersMarker()
}

fun f(`_`: OnlyNamedParametersMarker = OnlyNamedParametersMarker.INSTANCE, x: Int, y: Int)
outside the module,
f
can only be called by naming
x
and
y
a
e
@ephemient I think that behavior changed in Kotlin 1.5 (not sure though, I may be confusing that with a different named parameter change). I voted and found https://github.com/chao2zhang/RequireNamedArgument in the comments, so I'm gonna give that a shot.