Back to Intellij Community

RedundantConstructorKeyword

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

2025.3-rc-2195 B
Original Source

Reports a redundant 'constructor' keyword on primary constructors.

Example:

class Foo constructor(x: Int, y: Int)

After the quick-fix is applied:

class Foo(x: Int, y: Int)