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

Java enums #6629

Merged
merged 3 commits into from
Jun 8, 2019
Merged

Java enums #6629

merged 3 commits into from
Jun 8, 2019

Conversation

anatoliykmetyuk
Copy link
Contributor

No description provided.

@anatoliykmetyuk anatoliykmetyuk marked this pull request as ready for review June 8, 2019 10:16
@anatoliykmetyuk anatoliykmetyuk merged commit 83788d9 into scala:master Jun 8, 2019
@anatoliykmetyuk anatoliykmetyuk deleted the java-enums branch June 8, 2019 10:34
@sjrd
Copy link
Member

sjrd commented Jun 8, 2019

🎉 Consider me impressed!

override def transformValDef(tree: ValDef)(implicit ctx: Context): ValDef = {
val sym = tree.symbol
if ((sym.is(EnumValue) || sym.name == nme.DOLLAR_VALUES) && sym.owner.linkedClass.derivesFromJavaEnum)
sym.addAnnotation(Annotations.Annotation(defn.ScalaStaticAnnot))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this go into a SymTransformer?

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

Successfully merging this pull request may close these issues.

None yet

4 participants