Skip to content

Cannot create case class with members like _1 or _2 #872

Closed
@smarter

Description

@smarter
case class Foo(_1: Int)

Fails with:

 error: value _1 is already defined as method _1: => Int
case class Foo(_1: Int)
                 ^

Yes, people actually do this: https://github.com/molecule-labs/molecule/blob/master/molecule-core/src/main/scala/molecule/Tilt.scala#L26 Not sure if there's anything we can do here without a good rewriting tool.

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