Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Somehow fail when you're using object instead of case object #139

Open
reactormonk opened this issue May 5, 2017 · 1 comment
Open

Somehow fail when you're using object instead of case object #139

reactormonk opened this issue May 5, 2017 · 1 comment

Comments

@reactormonk
Copy link

When you're using

sealed trait Foo extends EnumEntry
object Bar extends Enum[Foo] {
  val values = findValues
  object Baz extends Foo
}

You'll just get garbage as the name, without any compiler error:

@ Bar.Baz 
res3: Bar.Baz.type = $sess.cmd2$Bar$Baz$@71ac5723
@lloydmeta
Copy link
Owner

lloydmeta commented May 5, 2017

That's a good idea, and shouldn't be too hard to do either once we have the trees (here)

One thing though: sometimes people override the entryName as a val or using their own string manipulation functions; in these cases, the check probably shouldn't trigger an error even if not using case object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants