Back to Intellij Community

GroovyAssignmentToMethodParameter

plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyAssignmentToMethodParameter.html

2025.3-rc-2216 B
Original Source

Reports assignment to method parameters.

While occasionally intended, this construct can be extremely confusing, and is often the result of a typo.

Example:

def m(a, b, c) {
      a = [] // warning
  }