Skip to content

fix #9873: move scala.Enum to scala.reflect.Enum #9942

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

Merged
merged 3 commits into from
Oct 5, 2020

Conversation

bishabosha
Copy link
Member

@bishabosha bishabosha commented Oct 5, 2020

Alternative to #9877

scala.reflect.Enum is now a universal super trait.

Also avoid using derivesFrom(defn.EnumClass) and instead look for enum flag.

@bishabosha bishabosha requested review from smarter, sjrd and odersky October 5, 2020 12:13
@bishabosha bishabosha force-pushed the topic/enum-rename-scala-enum branch from 54f9ef5 to 5b9b296 Compare October 5, 2020 12:16
package scala.reflect

/** A base trait of all enum classes */
super trait Enum extends Any, Product, Serializable:
Copy link
Member Author

Choose a reason for hiding this comment

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

added Any super class so it will be eliminated by drop super traits when the common superclass is AnyRef

@bishabosha bishabosha force-pushed the topic/enum-rename-scala-enum branch from 5b9b296 to f7797dd Compare October 5, 2020 12:18
scala.reflect.Enum is now a universal super trait.

Also avoid using derivesFrom(defn.EnumClass) and
instead look for enum flag.
@bishabosha bishabosha force-pushed the topic/enum-rename-scala-enum branch from f7797dd to 8f21d24 Compare October 5, 2020 12:28
@bishabosha bishabosha merged commit f0bbd95 into scala:master Oct 5, 2020
@bishabosha bishabosha deleted the topic/enum-rename-scala-enum branch October 5, 2020 22:56
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
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.

5 participants