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

Annotated classes receive unwanted companion object #93

Open
japgolly opened this issue Mar 16, 2017 · 0 comments
Open

Annotated classes receive unwanted companion object #93

japgolly opened this issue Mar 16, 2017 · 0 comments

Comments

@japgolly
Copy link

With Scala 2.12 and Macro Paradise 2.1.0, the following snippet:

package hmmm

final class anyAnnot extends scala.annotation.StaticAnnotation

object Hmmm {
  @anyAnnot class X
  val X = 123

  class Y
  val Y = 123
}

results in this compilation error:

[error] X is already defined as (compiler-generated) case class companion object X
[error]   val X = 123
[error]       ^

This issue originally raised as scala-js/scala-js#2806.

SethTisue pushed a commit to scalacommunitybuild/paradise that referenced this issue Nov 21, 2017
convert annotations and annotated (supersedes scalamacros#93)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant