-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Make custom Utf8Decoder replacement not extend platform class.
#123211
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
Conversation
The Dart 3.0 class modifiers will make `Utf8Decoder`, and other pure implementation classes, be `final`. This replacement class does not need to extend the original class, just like the `Utf8Codec` in the same file doesn't extend the `Ut8Codec` from the platform libraries. Instead it can just forward to a single `const` instance of the original class.
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
This is a reland of commit 608934e Can be landed when Flutter with flutter/flutter#123211 has been rolled into internal repository. Original change's description: > Reland "Add class modifiers to `dart:convert`." > > This is a reland of commit b2f4cf3 > > Commented out deprecation for now. > > Original change's description: > > Add class modifiers to `dart:convert`. > > > > The usual approach: > > Pure interfaces marked `interface`. > > Pure implementation classes marked `final`. > > Base classes marked `base` or nothing, and `mixin class` if reasonable. > > Combined X/XBase/XMixin where possible. > > > > CoreLibraryReviewExempt: Aske is away > > Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347 > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200 > > Reviewed-by: Stephen Adams <sra@google.com> > > Reviewed-by: Slava Egorov <vegorov@google.com> > > Reviewed-by: Nate Bosch <nbosch@google.com> > > Commit-Queue: Lasse Nielsen <lrn@google.com> > > CoreLibraryReviewExempt: Approved in original. > Change-Id: I1bc14f99b742567e2634dcfcbc52f332dbcc5364 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290521 > Reviewed-by: Nate Bosch <nbosch@google.com> > Commit-Queue: Lasse Nielsen <lrn@google.com> CoreLibraryReviewExempt: Approved in original. Change-Id: If157e1ef2339d7a06e99a1e402f2f8ac93550b83 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290960 Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Lasse Nielsen <lrn@google.com>
The Dart 3.0 class modifiers will make
Utf8Decoder, and other pure implementation classes, befinal.This replacement class does not need to extend the original class, just like the
Utf8Codecin the same file doesn't extend theUt8Codecfrom the platform libraries.Instead it can just forward to a single
constinstance of the original class.