Skip to content

Enum constructor should be hidden to users? #5019

Closed
@Blaisorblade

Description

@Blaisorblade

@hrhino writes the following disturbing snippet:

enum A { def newA(tag: Int) = new A { val enumTag = tag } }

Should we allow users calling the constructor? It seems that's not intended...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions