Back to Intellij Community

GrPermitsClause

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

2025.3-rc-2392 B
Original Source

Reports permitted classes that do not extend the sealed base class.

Groovy does not require that all permitted classes should be available in compile-time and compiled along with base class. Compiler will not warn the user on dealing with non-extending permitted subclass, but it contradicts the nature of sealed classes.

Example:

class A permits B {} // reports B
  class B {}