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

Remove extra hierarchy level in DateTimeUnit sealed class inheritors #131

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

ilya-g
Copy link
Member

@ilya-g ilya-g commented Jul 8, 2021

No description provided.

@ilya-g ilya-g requested a review from dkhalanskyjb July 8, 2021 08:53
}
@Suppress("TOPLEVEL_TYPEALIASES_ONLY")
@Deprecated("Use DateTimeUnit.DayBased", ReplaceWith("DateTimeUnit.DayBased", "kotlinx.datetime.DateTimeUnit"))
public typealias DayBased = DateTimeUnit.DayBased
Copy link
Collaborator

Choose a reason for hiding this comment

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

I seem to remember that these type aliases didn't work in some regard, right? I tried to use them and everything worked fine. Does this mean that you found a solution to that issue? If not, Deprecated should probably be with the DeprecationLevel.ERROR.

Copy link
Member Author

@ilya-g ilya-g Sep 21, 2021

Choose a reason for hiding this comment

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

As I recall, they caused problems when used from inside of the DateTimeUnit class the inheritors of DateBased class. That's why I had to prefix the affected types with DateTimeUnit. — to avoid resolving to type aliases there.

@ilya-g ilya-g merged commit 4177ff2 into master Sep 21, 2021
@ilya-g ilya-g deleted the flatten-datetimeunit branch September 21, 2021 05:16
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.

2 participants