Skip to content

Traits are classes according to some sources, not by others. #18416

@JanBliznicenko

Description

@JanBliznicenko

There are methods SystemEnvironment >> #classAndTraitNames and SystemEnvironment >> #classNames. Their names suggest that one includes Traits, while the other one does not. classAndTraitNames just returns self classNames with a comment saying that traits are normal classes. That would be ok, but in that case, why does the method classAndTraitNames exist at all?

If we ask a trait directly if it is in fact a class, it replies it is not (for example TAssertable isClass returns false). Yet Trait is a subclass of Class.

I find it a little inconsistent and misleading.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions