Inspectopedia
 
2024.3

Non-extending permitted subclasses

Error
Reliability
New
Last modified: 03 December 2024

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: