Skip to content

Commit 24b14ce

Browse files
johnniwintherCommit Queue
authored andcommitted
[cfe] Remove tests using import augment
This is in preparation for a change in the CFE that stops support for 'import augment'. Change-Id: Ia33b815ec554bae03e3a916ce22830b36e504771 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413221 Reviewed-by: Chloe Stefantsova <[email protected]> Reviewed-by: Lasse Nielsen <[email protected]> Commit-Queue: Johnni Winther <[email protected]>
1 parent 5ae4277 commit 24b14ce

File tree

132 files changed

+31
-8031
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+31
-8031
lines changed

pkg/front_end/lib/src/base/modifiers.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ extension type const Modifiers(int _mask) implements Object {
174174
Token? staticToken,
175175
Token? varFinalOrConst}) {
176176
assert(abstractToken == null || abstractToken.type == Keyword.ABSTRACT);
177-
assert(augmentToken == null || augmentToken.type == Keyword.AUGMENT);
177+
assert(augmentToken == null ||
178+
// Coverage-ignore(suite): Not run.
179+
augmentToken.type == Keyword.AUGMENT);
178180
assert(baseToken == null || baseToken.type == Keyword.BASE);
179181
assert(covariantToken == null || covariantToken.type == Keyword.COVARIANT);
180182
assert(constToken == null || constToken.type == Keyword.CONST);

pkg/front_end/messages.status

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ CompilingWithoutSoundNullSafety/analyzerCode: Fail
8282
ConflictingModifiers/part_wrapped_script1: Fail
8383
ConflictingModifiers/script1: Fail
8484
ConflictsWithTypeParameter/example: Fail
85-
ConstructorShouldBeListedAsCallableInDynamicInterface/analyzerCode: Fail
86-
ConstructorShouldBeListedAsCallableInDynamicInterface/example: Fail
8785
ConstAndFinal/declaration3: Fail
8886
ConstAndFinal/declaration4: Fail
8987
ConstAndFinal/part_wrapped_declaration3: Fail
@@ -163,6 +161,8 @@ ConstEvalZeroDivisor/example: Fail
163161
ConstFieldWithoutInitializer/example: Fail
164162
ConstructorNotFound/example: Fail
165163
ConstructorNotSync/example: Fail
164+
ConstructorShouldBeListedAsCallableInDynamicInterface/analyzerCode: Fail
165+
ConstructorShouldBeListedAsCallableInDynamicInterface/example: Fail
166166
ConstructorTearOffWithTypeArguments/analyzerCode: Fail
167167
ContinueLabelNotTarget/example: Fail
168168
ContinueOutsideOfLoop/part_wrapped_script1: Fail
@@ -795,10 +795,13 @@ NeverValueWarning/analyzerCode: Fail
795795
NeverValueWarning/example: Fail
796796
NewAsSelector/analyzerCode: Fail
797797
NoAugmentSuperInvokeTarget/analyzerCode: Fail
798+
NoAugmentSuperInvokeTarget/example: Fail
798799
NoAugmentSuperInvokeTarget/part_wrapped_script: Fail # Uses imports
799800
NoAugmentSuperReadTarget/analyzerCode: Fail
801+
NoAugmentSuperReadTarget/example: Fail
800802
NoAugmentSuperReadTarget/part_wrapped_script: Fail # Uses imports
801803
NoAugmentSuperWriteTarget/analyzerCode: Fail
804+
NoAugmentSuperWriteTarget/example: Fail
802805
NoAugmentSuperWriteTarget/part_wrapped_script: Fail # Uses imports
803806
NoFormals/example: Fail
804807
NoMacroApplicationTarget/analyzerCode: Fail
@@ -811,14 +814,19 @@ NonAgnosticConstant/example: Fail
811814
NonAsciiIdentifier/expression: Fail
812815
NonAsciiIdentifier/part_wrapped_expression: Fail
813816
NonAugmentationClassConflict/analyzerCode: Fail
817+
NonAugmentationClassConflict/example: Fail
814818
NonAugmentationClassConflict/part_wrapped_script: Fail
815819
NonAugmentationClassMemberConflict/analyzerCode: Fail
820+
NonAugmentationClassMemberConflict/example: Fail
816821
NonAugmentationClassMemberConflict/part_wrapped_script: Fail # Uses imports
817822
NonAugmentationConstructorConflict/analyzerCode: Fail
823+
NonAugmentationConstructorConflict/example: Fail
818824
NonAugmentationConstructorConflict/part_wrapped_script: Fail # Uses imports
819825
NonAugmentationLibraryConflict/analyzerCode: Fail
826+
NonAugmentationLibraryConflict/example: Fail
820827
NonAugmentationLibraryConflict/part_wrapped_script: Fail
821828
NonAugmentationLibraryMemberConflict/analyzerCode: Fail
829+
NonAugmentationLibraryMemberConflict/example: Fail
822830
NonAugmentationLibraryMemberConflict/part_wrapped_script: Fail # Uses imports
823831
NonConstConstructor/example: Fail
824832
NonConstFactory/example: Fail
@@ -949,6 +957,8 @@ PrefixAfterCombinator/example: Fail
949957
PreviousUseOfName/analyzerCode: Fail
950958
PreviousUseOfName/example: Fail
951959
PrivateNamedParameter/example: Fail
960+
RecordUseCannotBePlacedHere/analyzerCode: Fail
961+
RecordUseCannotBePlacedHere/example: Fail
952962
RecordUsedAsCallable/analyzerCode: Fail
953963
RecordUsedAsCallable/part_wrapped_script: Fail
954964
RecordUsedAsCallable/script: Fail
@@ -962,8 +972,6 @@ RequiredNamedParameterHasDefaultValueError/analyzerCode: Fail
962972
RequiredNamedParameterHasDefaultValueError/example: Fail
963973
RequiredNamedParameterHasDefaultValueWarning/analyzerCode: Fail
964974
RequiredNamedParameterHasDefaultValueWarning/example: Fail
965-
RecordUseCannotBePlacedHere/analyzerCode: Fail
966-
RecordUseCannotBePlacedHere/example: Fail
967975
RestPatternInMapPattern/analyzerCode: Fail
968976
RestPatternMoreThanOne/analyzerCode: Fail
969977
RethrowNotCatch/example: Fail
@@ -1063,14 +1071,18 @@ UnexpectedToken/script1: Fail
10631071
UnhandledMacroApplication/analyzerCode: Fail
10641072
UnhandledMacroApplication/example: Fail
10651073
UnmatchedAugmentationClass/analyzerCode: Fail
1074+
UnmatchedAugmentationClass/example: Fail
10661075
UnmatchedAugmentationClass/part_wrapped_script: Fail
10671076
UnmatchedAugmentationClassMember/analyzerCode: Fail
1077+
UnmatchedAugmentationClassMember/example: Fail
10681078
UnmatchedAugmentationClassMember/part_wrapped_script: Fail # Uses imports
10691079
UnmatchedAugmentationConstructor/analyzerCode: Fail
1080+
UnmatchedAugmentationConstructor/example: Fail
10701081
UnmatchedAugmentationConstructor/part_wrapped_script: Fail # Uses imports
10711082
UnmatchedAugmentationDeclaration/analyzerCode: Fail
10721083
UnmatchedAugmentationDeclaration/example: Fail
10731084
UnmatchedAugmentationLibraryMember/analyzerCode: Fail
1085+
UnmatchedAugmentationLibraryMember/example: Fail
10741086
UnmatchedAugmentationLibraryMember/part_wrapped_script: Fail # Uses imports
10751087
UnmatchedPatchClass/analyzerCode: Fail
10761088
UnmatchedPatchClass/example: Fail

pkg/front_end/messages.yaml

Lines changed: 12 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -6266,15 +6266,7 @@ MacroClassNotDeclaredMacro:
62666266
UnmatchedAugmentationClassMember:
62676267
problemMessage: "Augmentation member '#name' doesn't match a member in the augmented class."
62686268
correctionMessage: "Try changing the name to an existing member or removing the 'augment' modifier."
6269-
experiments: macros
6270-
script:
6271-
main.dart:
6272-
import augment 'lib.dart';
6273-
class Class {}
6274-
lib.dart:
6275-
augment class Class {
6276-
augment void method() {}
6277-
}
6269+
experiments: augmentations
62786270

62796271
UnmatchedPatchClassMember:
62806272
problemMessage: "Patch member '#name' doesn't match a member in the origin class."
@@ -6283,12 +6275,7 @@ UnmatchedPatchClassMember:
62836275
UnmatchedAugmentationLibraryMember:
62846276
problemMessage: "Augmentation member '#name' doesn't match a member in the augmented library."
62856277
correctionMessage: "Try changing the name to an existing member or removing the 'augment' modifier."
6286-
experiments: macros
6287-
script:
6288-
main.dart:
6289-
import augment 'lib.dart';
6290-
lib.dart:
6291-
augment void method() {}
6278+
experiments: augmentations
62926279

62936280
UnmatchedPatchLibraryMember:
62946281
problemMessage: "Patch member '#name' doesn't match a member in the origin library."
@@ -6297,12 +6284,7 @@ UnmatchedPatchLibraryMember:
62976284
UnmatchedAugmentationClass:
62986285
problemMessage: "Augmentation class '#name' doesn't match a class in the augmented library."
62996286
correctionMessage: "Try changing the name to an existing class or removing the 'augment' modifier."
6300-
experiments: macros
6301-
script:
6302-
main.dart:
6303-
import augment 'lib.dart';
6304-
lib.dart:
6305-
augment class Class {}
6287+
experiments: augmentations
63066288

63076289
UnmatchedPatchClass:
63086290
problemMessage: "Patch class '#name' doesn't match a class in the origin library."
@@ -6320,17 +6302,7 @@ UnmatchedPatchDeclaration:
63206302
UnmatchedAugmentationConstructor:
63216303
problemMessage: "Augmentation constructor '#name' doesn't match a constructor in the augmented class."
63226304
correctionMessage: "Try changing the name to an existing constructor or removing the 'augment' modifier."
6323-
experiments: macros
6324-
script:
6325-
main.dart:
6326-
import augment 'lib.dart';
6327-
class Class {
6328-
Class.name1();
6329-
}
6330-
lib.dart:
6331-
augment class Class {
6332-
augment Class.name2();
6333-
}
6305+
experiments: augmentations
63346306

63356307
UnmatchedPatchConstructor:
63366308
problemMessage: "Patch constructor '#name' doesn't match a constructor in the origin class."
@@ -6339,17 +6311,7 @@ UnmatchedPatchConstructor:
63396311
NonAugmentationClassMemberConflict:
63406312
problemMessage: "Member '#name' conflicts with an existing member of the same name in the augmented class."
63416313
correctionMessage: "Try changing the name of the member or adding an 'augment' modifier."
6342-
experiments: macros
6343-
script:
6344-
main.dart:
6345-
import augment 'lib.dart';
6346-
class Class {
6347-
void method() {}
6348-
}
6349-
lib.dart:
6350-
augment class Class {
6351-
void method() {}
6352-
}
6314+
experiments: augmentations
63536315

63546316
NonPatchClassMemberConflict:
63556317
problemMessage: "Member '#name' conflicts with an existing member of the same name in the origin class."
@@ -6358,13 +6320,7 @@ NonPatchClassMemberConflict:
63586320
NonAugmentationLibraryMemberConflict:
63596321
problemMessage: "Member '#name' conflicts with an existing member of the same name in the augmented library."
63606322
correctionMessage: "Try changing the name of the member or adding an 'augment' modifier."
6361-
experiments: macros
6362-
script:
6363-
main.dart:
6364-
import augment 'lib.dart';
6365-
void method() {}
6366-
lib.dart:
6367-
void method() {}
6323+
experiments: augmentations
63686324

63696325
NonPatchLibraryMemberConflict:
63706326
problemMessage: "Member '#name' conflicts with an existing member of the same name in the origin library."
@@ -6373,13 +6329,7 @@ NonPatchLibraryMemberConflict:
63736329
NonAugmentationLibraryConflict:
63746330
problemMessage: "Declaration '#name' conflicts with an existing declaration of the same name in the augmented library."
63756331
correctionMessage: "Try changing the name of the declaration."
6376-
experiments: macros
6377-
script:
6378-
main.dart:
6379-
import augment 'lib.dart';
6380-
void method() {}
6381-
lib.dart:
6382-
class method {}
6332+
experiments: augmentations
63836333

63846334
NonPatchLibraryConflict:
63856335
problemMessage: "Declaration '#name' conflicts with an existing declaration of the same name in the origin library."
@@ -6388,13 +6338,7 @@ NonPatchLibraryConflict:
63886338
NonAugmentationClassConflict:
63896339
problemMessage: "Class '#name' conflicts with an existing class of the same name in the augmented library."
63906340
correctionMessage: "Try changing the name of the class or adding an 'augment' modifier."
6391-
experiments: macros
6392-
script:
6393-
main.dart:
6394-
import augment 'lib.dart';
6395-
class Class {}
6396-
lib.dart:
6397-
class Class {}
6341+
experiments: augmentations
63986342

63996343
NonPatchClassConflict:
64006344
problemMessage: "Class '#name' conflicts with an existing class of the same name in the origin library."
@@ -6403,17 +6347,7 @@ NonPatchClassConflict:
64036347
NonAugmentationConstructorConflict:
64046348
problemMessage: "Constructor '#name' conflicts with an existing constructor of the same name in the augmented class."
64056349
correctionMessage: "Try changing the name of the constructor or adding an 'augment' modifier."
6406-
experiments: macros
6407-
script:
6408-
main.dart:
6409-
import augment 'lib.dart';
6410-
class Class {
6411-
Class.name();
6412-
}
6413-
lib.dart:
6414-
augment class Class {
6415-
Class.name();
6416-
}
6350+
experiments: augmentations
64176351

64186352
NonPatchConstructorConflict:
64196353
problemMessage: "Constructor '#name' conflicts with an existing constructor of the same name in the origin class."
@@ -6507,39 +6441,15 @@ MixinApplicationNoConcreteMemberContext:
65076441

65086442
NoAugmentSuperReadTarget:
65096443
problemMessage: "Cannot read from 'augment super'."
6510-
experiments: macros
6511-
script:
6512-
main.dart:
6513-
import augment 'lib.dart';
6514-
void set setter(value) {}
6515-
lib.dart:
6516-
augment void set setter(value) {
6517-
augment super;
6518-
}
6444+
experiments: augmentations
65196445

65206446
NoAugmentSuperWriteTarget:
65216447
problemMessage: "Cannot write to 'augment super'."
6522-
experiments: macros
6523-
script:
6524-
main.dart:
6525-
import augment 'lib.dart';
6526-
void method() {}
6527-
lib.dart:
6528-
augment void method() {
6529-
augment super = 42;
6530-
}
6448+
experiments: augmentations
65316449

65326450
NoAugmentSuperInvokeTarget:
65336451
problemMessage: "Cannot call 'augment super'."
6534-
experiments: macros
6535-
script:
6536-
main.dart:
6537-
import augment 'lib.dart';
6538-
void set setter(value) {}
6539-
lib.dart:
6540-
augment void set setter(value) {
6541-
augment super();
6542-
}
6452+
experiments: augmentations
65436453

65446454
IndexOutOfBoundInRecordIndexGet:
65456455
problemMessage: "Index #count is out of range 0..#count2 of positional fields of records #type."

pkg/front_end/testcases/macros/augment_class.dart

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)