Inspectopedia Help

Inconsistent class/module alias

Reports inconsistent declarations of class and module aliases. Classes cannot be aliased as modules, and modules cannot be aliased as classes.

Classes aliased as modules and vice versa produce InconsistentClassModuleAliasError.

A quick fix is available to navigate to the conflicting declarations.


class User end # Class 'User' used as a module alias target module Customer = User

Inspection Details

Available in:

Qodana for Ruby 2023.3, RubyMine 2023.3


Ruby, 233.SNAPSHOT

Last modified: 13 July 2023