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

update: KT-52485 for enum classes #3056

Merged
merged 1 commit into from
Jul 11, 2022
Merged

update: KT-52485 for enum classes #3056

merged 1 commit into from
Jul 11, 2022

Conversation

danil-pavlov
Copy link
Contributor

No description provided.

@danil-pavlov danil-pavlov requested a review from koshachy July 8, 2022 12:39
Copy link
Member

@koshachy koshachy left a comment

Choose a reason for hiding this comment

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

LGTM

@danil-pavlov danil-pavlov merged commit b945d9f into master Jul 11, 2022
@danil-pavlov danil-pavlov deleted the enum-upd branch July 11, 2022 12:10
@@ -73,6 +73,9 @@ fun main() {
```
{kotlin-runnable="true"}

All enum constants implement the [Comparable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-comparable/index.html)
Copy link
Member

Choose a reason for hiding this comment

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

@danil-pavlov I would say that all enum classes implement Comparable by default rather than individual constants. In fact, this interface is implemented in the base Enum superclass without a possibility to change that implementation in enum subclasses.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing that out! I'm gonna fix it in a new PR

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.

4 participants