当主构造函数隐式可用时,报告其中为空白的主构造函数。

主构造函数是冗余的,当其没有任何注解或可见性修饰符时可以安全地省略。 使用“移除空的主构造函数”快速修复来清理代码。

示例:


  class MyClassA constructor() //  redundant, can be replaced with 'class MyClassA'

  annotation class MyAnnotation
  class MyClassB @MyAnnotation constructor() //  required because of annotation

  class MyClassC private constructor() // required because of visibility modifier