Back to Intellij Community

RedundantValueArgument

plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/RedundantValueArgument.html

2025.3-rc-2237 B
Original Source

Reports arguments that are equal to the default values of the corresponding parameters.

Example:

fun foo(x: Int, y: Int = 2) {}

fun bar() {
    foo(1, 2)
}

After the quick-fix is applied:

fun bar() {
    foo(1)
}