mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 11:31:57 +00:00
Roll dart_style into the SDK.
This has two changes: - Hide "--fix" in the help. The command is still fully supported, we just don't show it because we want to gradually migrate users to "dart fix". - Remove support for the "interface", "final", and "sealed" modifiers on mixin declarations, since the proposal no longer supports those (and we need to remove them from the analyzer AST API). There are no meaningful style changes, so there's no need to update the pre-build SDK for this change. Change-Id: I2357970e298a9be8f6f26efb5b922d40ee4fbb7d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290020 Commit-Queue: Bob Nystrom <rnystrom@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: Kallen Tu <kallentu@google.com>
This commit is contained in:
parent
7e6e56b9b5
commit
5d858f01de
2
DEPS
2
DEPS
|
@ -133,7 +133,7 @@ vars = {
|
|||
# and land the review.
|
||||
#
|
||||
# For more details, see https://github.com/dart-lang/sdk/issues/30164.
|
||||
"dart_style_rev": "a3f1b041f3c5045d1fee7f1129075d0ad6a4a96e", # disable rev_sdk_deps.dart
|
||||
"dart_style_rev": "568333db2650e77c0f96ebc77969c9469cf514f0", # disable rev_sdk_deps.dart
|
||||
"dartdoc_rev": "7fde7a4d61dd251a4e48bf85ccab34f28ec8da71",
|
||||
"ffi_rev": "32f5eefea59d4461e8ab40e83f157e49d5abe0da",
|
||||
"file_rev": "72a67c33f90bfb7e10057e286e06d2fe3baa4d98",
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
final mixin M1 {}
|
||||
sealed mixin M2 {}
|
||||
|
||||
final
|
||||
mixin M1 {}
|
||||
sealed
|
||||
mixin M2 {}
|
||||
base class S {}
|
||||
|
||||
final class C extends S with M1, M2 {}
|
||||
|
||||
final class D = S with M1, M2;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
final class A {}
|
||||
|
||||
abstract final class B {}
|
||||
|
||||
final mixin M {}
|
||||
final
|
||||
mixin M {}
|
||||
final class C = Object with M;
|
||||
|
|
|
@ -1,31 +1,18 @@
|
|||
final class FinalClass {}
|
||||
|
||||
final mixin FinalMixin {}
|
||||
|
||||
final
|
||||
mixin FinalMixin {}
|
||||
base class BaseClass extends FinalClass {}
|
||||
|
||||
sealed class SubtypeOfFinal extends FinalClass {}
|
||||
|
||||
class RegularClass {}
|
||||
|
||||
final mixin FinalMixin2 {}
|
||||
|
||||
final
|
||||
mixin FinalMixin2 {}
|
||||
class Extends extends FinalClass {}
|
||||
|
||||
class Implements implements FinalClass {}
|
||||
|
||||
mixin MixinImplements implements FinalMixin {}
|
||||
|
||||
class With with FinalMixin {}
|
||||
|
||||
class With2 with FinalMixin, FinalMixin2 {}
|
||||
|
||||
mixin On on FinalClass {}
|
||||
|
||||
class ExtendsExtends extends Extends {}
|
||||
|
||||
class Multiple extends BaseClass implements FinalMixin {}
|
||||
|
||||
class Multiple2 extends RegularClass implements FinalClass {}
|
||||
|
||||
class IndirectSubtype extends SubtypeOfFinal {}
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
import 'main_lib.dart';
|
||||
|
||||
final class ExtendsFinalClass extends A {}
|
||||
|
||||
final class ImplementsFinalClass implements A {}
|
||||
|
||||
final class ImplementsFinalMixin implements M {}
|
||||
|
||||
final class MixInFinalMixin with M {}
|
||||
|
||||
enum EnumImplementsFinalMixin implements M { x }
|
||||
|
||||
enum EnumMixInFinalMixin with M { x }
|
||||
|
||||
final mixin MixinOnA on A {}
|
||||
final mixin MixinOnM on M {}
|
||||
final mixin MixinOnAM on A, M {}
|
||||
final
|
||||
mixin MixinOnA on A {}
|
||||
final
|
||||
mixin MixinOnM on M {}
|
||||
final
|
||||
mixin MixinOnAM on A, M {}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
interface class A {}
|
||||
|
||||
abstract interface class B {}
|
||||
|
||||
interface mixin M {}
|
||||
interface
|
||||
mixin M {}
|
||||
interface class C = Object with M;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// @dart = 2.19
|
||||
final class A {}
|
||||
|
||||
abstract final class B {}
|
||||
|
||||
final mixin M {}
|
||||
final
|
||||
mixin M {}
|
||||
final class C = Object with M;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// @dart = 2.19
|
||||
interface class A {}
|
||||
|
||||
abstract interface class B {}
|
||||
|
||||
interface mixin M {}
|
||||
interface
|
||||
mixin M {}
|
||||
interface class C = Object with M;
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
sealed mixin M {}
|
||||
sealed
|
||||
mixin M {}
|
||||
|
|
|
@ -21,6 +21,19 @@ regress/issue_39035.crash: EmptyOutput
|
|||
regress/issue_39091_2: EmptyOutput
|
||||
regress/utf_16_le_content.crash: EmptyOutput
|
||||
|
||||
# TODO(rnystrom): These tests are using modifiers that are no longer valid on
|
||||
# mixins. The formatter no longer allows them. When the tests are updated to no
|
||||
# longer use those disallowed modifiers, the formatter crashes should be
|
||||
# resolved.
|
||||
class_modifiers/anonymous_mixin: FormatterCrash
|
||||
class_modifiers/final/final_class_declaration: FormatterCrash
|
||||
class_modifiers/final/final_subtype_not_base_final_sealed: FormatterCrash
|
||||
class_modifiers/final/outside_library/main: FormatterCrash
|
||||
class_modifiers/interface/interface_class_declaration: FormatterCrash
|
||||
general/final_class_declaration: FormatterCrash
|
||||
general/interface_class_declaration: FormatterCrash
|
||||
sealed_class/sealed_mixin_declaration: FormatterCrash
|
||||
|
||||
class_modifiers/mixin/mixin_class_invalid_modifiers: FormatterCrash
|
||||
const_functions/const_functions_const_ctor: FormatterCrash
|
||||
const_functions/const_functions_const_ctor_error: FormatterCrash
|
||||
|
|
Loading…
Reference in a new issue