Skip to content

Disallow open modifier on traits and abstract classes #11963

@smarter

Description

@smarter

As https://dotty.epfl.ch/docs/reference/other-new-features/open-classes.html mentions:

Traits or abstract classes are always open, so open is redundant for them.

But right now open trait Foo and open abstract class Foo compile without error, they should at least emit a warning, like final object Foo already does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:reportingError reporting including formatting, implicit suggestions, etcgood first issuePerfect for someone who wants to get started contributingitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions