Skip to content

Commit eddf73d

Browse files
author
Dart CI
committed
Version 2.19.0-429.0.dev
Merge 722109d into dev
2 parents bb6aa5a + 722109d commit eddf73d

16 files changed

+44
-61
lines changed

pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ import '../fasta_codes.dart'
8383
templateExperimentNotEnabledOffByDefault;
8484
import '../identifiers.dart'
8585
show Identifier, InitializedIdentifier, QualifiedName, flattenName;
86-
import '../messages.dart' as messages show getLocationFromUri;
8786
import '../modifier.dart'
8887
show Modifier, constMask, covariantMask, finalMask, lateMask, requiredMask;
8988
import '../names.dart' show emptyName, minusName, plusName;
@@ -7608,25 +7607,8 @@ class BodyBuilder extends StackListenerImpl
76087607

76097608
Expression buildFallThroughError(int charOffset) {
76107609
addProblem(fasta.messageSwitchCaseFallThrough, charOffset, noLength);
7611-
7612-
// TODO(ahe): The following doesn't make sense for the Analyzer. It should
7613-
// be moved to [Forest] or conditional on `forest is Fangorn`.
7614-
7615-
// TODO(ahe): Compute a LocatedMessage above instead?
7616-
Location? location = messages.getLocationFromUri(uri, charOffset);
7617-
7618-
return forest.createThrow(
7619-
charOffset,
7620-
buildStaticInvocation(
7621-
libraryBuilder
7622-
.loader.coreTypes.fallThroughErrorUrlAndLineConstructor,
7623-
forest.createArguments(noLocation, <Expression>[
7624-
forest.createStringLiteral(
7625-
charOffset, "${location?.file ?? uri}"),
7626-
forest.createIntLiteral(charOffset, location?.line ?? 0),
7627-
]),
7628-
constness: Constness.explicitNew,
7629-
charOffset: charOffset));
7610+
return new InvalidExpression(
7611+
fasta.messageSwitchCaseFallThrough.problemMessage);
76307612
}
76317613

76327614
Expression buildAbstractClassInstantiationError(

pkg/front_end/testcases/general/fallthrough.dart.weak.expect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static method main(core::List<core::String*>* args) → void {
2121
case #C1:
2222
{
2323
x = 4;
24-
throw new core::FallThroughError::_create("org-dartlang-testcase:///fallthrough.dart", 10);
24+
invalid-expression "Switch case may fall through to the next case.";
2525
}
2626
#L3:
2727
case #C2:
@@ -38,7 +38,7 @@ static method main(core::List<core::String*>* args) → void {
3838
else {
3939
return;
4040
}
41-
throw new core::FallThroughError::_create("org-dartlang-testcase:///fallthrough.dart", 14);
41+
invalid-expression "Switch case may fall through to the next case.";
4242
}
4343
#L5:
4444
case #C5:

pkg/front_end/testcases/general/fallthrough.dart.weak.modular.expect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static method main(core::List<core::String*>* args) → void {
2121
case #C1:
2222
{
2323
x = 4;
24-
throw new core::FallThroughError::_create("org-dartlang-testcase:///fallthrough.dart", 10);
24+
invalid-expression "Switch case may fall through to the next case.";
2525
}
2626
#L3:
2727
case #C2:
@@ -38,7 +38,7 @@ static method main(core::List<core::String*>* args) → void {
3838
else {
3939
return;
4040
}
41-
throw new core::FallThroughError::_create("org-dartlang-testcase:///fallthrough.dart", 14);
41+
invalid-expression "Switch case may fall through to the next case.";
4242
}
4343
#L5:
4444
case #C5:

pkg/front_end/testcases/general/fallthrough.dart.weak.transformed.expect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static method main(core::List<core::String*>* args) → void {
2121
case #C1:
2222
{
2323
x = 4;
24-
throw new core::FallThroughError::_create("org-dartlang-testcase:///fallthrough.dart", 10);
24+
invalid-expression "Switch case may fall through to the next case.";
2525
}
2626
#L3:
2727
case #C2:
@@ -38,7 +38,7 @@ static method main(core::List<core::String*>* args) → void {
3838
else {
3939
return;
4040
}
41-
throw new core::FallThroughError::_create("org-dartlang-testcase:///fallthrough.dart", 14);
41+
invalid-expression "Switch case may fall through to the next case.";
4242
}
4343
#L5:
4444
case #C5:

pkg/front_end/testcases/rasta/switch_execution_case_t01.dart.weak.expect

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ static method test(dynamic value) → dynamic {
3131
case #C2:
3232
{
3333
result = 2;
34-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_execution_case_t01.dart", 37);
34+
invalid-expression "Switch case may fall through to the next case.";
3535
}
3636
#L4:
3737
case #C3:
3838
{
3939
result = 3;
40-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_execution_case_t01.dart", 38);
40+
invalid-expression "Switch case may fall through to the next case.";
4141
}
4242
#L5:
4343
default:
@@ -56,7 +56,7 @@ static method testEmptyCases(dynamic value) → dynamic {
5656
case #C2:
5757
{
5858
result = 1;
59-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_execution_case_t01.dart", 48);
59+
invalid-expression "Switch case may fall through to the next case.";
6060
}
6161
#L8:
6262
case #C3:

pkg/front_end/testcases/rasta/switch_execution_case_t01.dart.weak.modular.expect

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ static method test(dynamic value) → dynamic {
3131
case #C2:
3232
{
3333
result = 2;
34-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_execution_case_t01.dart", 37);
34+
invalid-expression "Switch case may fall through to the next case.";
3535
}
3636
#L4:
3737
case #C3:
3838
{
3939
result = 3;
40-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_execution_case_t01.dart", 38);
40+
invalid-expression "Switch case may fall through to the next case.";
4141
}
4242
#L5:
4343
default:
@@ -56,7 +56,7 @@ static method testEmptyCases(dynamic value) → dynamic {
5656
case #C2:
5757
{
5858
result = 1;
59-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_execution_case_t01.dart", 48);
59+
invalid-expression "Switch case may fall through to the next case.";
6060
}
6161
#L8:
6262
case #C3:

pkg/front_end/testcases/rasta/switch_execution_case_t01.dart.weak.transformed.expect

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ static method test(dynamic value) → dynamic {
3131
case #C2:
3232
{
3333
result = 2;
34-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_execution_case_t01.dart", 37);
34+
invalid-expression "Switch case may fall through to the next case.";
3535
}
3636
#L4:
3737
case #C3:
3838
{
3939
result = 3;
40-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_execution_case_t01.dart", 38);
40+
invalid-expression "Switch case may fall through to the next case.";
4141
}
4242
#L5:
4343
default:
@@ -56,7 +56,7 @@ static method testEmptyCases(dynamic value) → dynamic {
5656
case #C2:
5757
{
5858
result = 1;
59-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_execution_case_t01.dart", 48);
59+
invalid-expression "Switch case may fall through to the next case.";
6060
}
6161
#L8:
6262
case #C3:

pkg/front_end/testcases/rasta/switch_fall_through.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// @dart=2.9
66

7-
main() {
7+
test() {
88
switch (1) {
99
case 1:
1010
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// @dart = 2.9
2-
main() {}
2+
test() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// @dart = 2.9
2-
main() {}
2+
test() {}

pkg/front_end/testcases/rasta/switch_fall_through.dart.weak.expect

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ library;
2525
import self as self;
2626
import "dart:core" as core;
2727

28-
static method main() → dynamic {
28+
static method test() → dynamic {
2929
#L1:
3030
switch(1) {
3131
#L2:
@@ -36,7 +36,7 @@ static method main() → dynamic {
3636
break #L1;
3737
;
3838
}
39-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 9);
39+
invalid-expression "Switch case may fall through to the next case.";
4040
}
4141
#L3:
4242
case #C2:
@@ -47,7 +47,7 @@ static method main() → dynamic {
4747
break #L1;
4848
}
4949
}
50-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 15);
50+
invalid-expression "Switch case may fall through to the next case.";
5151
}
5252
#L4:
5353
case #C3:
@@ -58,7 +58,7 @@ static method main() → dynamic {
5858
finally {
5959
break #L1;
6060
}
61-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 22);
61+
invalid-expression "Switch case may fall through to the next case.";
6262
}
6363
#L5:
6464
case #C4:
@@ -69,7 +69,7 @@ static method main() → dynamic {
6969
}
7070
finally {
7171
}
72-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 28);
72+
invalid-expression "Switch case may fall through to the next case.";
7373
}
7474
#L6:
7575
case #C5:
@@ -79,7 +79,7 @@ static method main() → dynamic {
7979
}
8080
finally {
8181
}
82-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 33);
82+
invalid-expression "Switch case may fall through to the next case.";
8383
}
8484
#L7:
8585
case #C6:

pkg/front_end/testcases/rasta/switch_fall_through.dart.weak.modular.expect

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ library;
2525
import self as self;
2626
import "dart:core" as core;
2727

28-
static method main() → dynamic {
28+
static method test() → dynamic {
2929
#L1:
3030
switch(1) {
3131
#L2:
@@ -36,7 +36,7 @@ static method main() → dynamic {
3636
break #L1;
3737
;
3838
}
39-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 9);
39+
invalid-expression "Switch case may fall through to the next case.";
4040
}
4141
#L3:
4242
case #C2:
@@ -47,7 +47,7 @@ static method main() → dynamic {
4747
break #L1;
4848
}
4949
}
50-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 15);
50+
invalid-expression "Switch case may fall through to the next case.";
5151
}
5252
#L4:
5353
case #C3:
@@ -58,7 +58,7 @@ static method main() → dynamic {
5858
finally {
5959
break #L1;
6060
}
61-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 22);
61+
invalid-expression "Switch case may fall through to the next case.";
6262
}
6363
#L5:
6464
case #C4:
@@ -69,7 +69,7 @@ static method main() → dynamic {
6969
}
7070
finally {
7171
}
72-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 28);
72+
invalid-expression "Switch case may fall through to the next case.";
7373
}
7474
#L6:
7575
case #C5:
@@ -79,7 +79,7 @@ static method main() → dynamic {
7979
}
8080
finally {
8181
}
82-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 33);
82+
invalid-expression "Switch case may fall through to the next case.";
8383
}
8484
#L7:
8585
case #C6:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
library;
22
import self as self;
33

4-
static method main() → dynamic
4+
static method test() → dynamic
55
;

pkg/front_end/testcases/rasta/switch_fall_through.dart.weak.transformed.expect

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ library;
2525
import self as self;
2626
import "dart:core" as core;
2727

28-
static method main() → dynamic {
28+
static method test() → dynamic {
2929
#L1:
3030
switch(1) {
3131
#L2:
@@ -36,7 +36,7 @@ static method main() → dynamic {
3636
break #L1;
3737
;
3838
}
39-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 9);
39+
invalid-expression "Switch case may fall through to the next case.";
4040
}
4141
#L3:
4242
case #C2:
@@ -47,7 +47,7 @@ static method main() → dynamic {
4747
break #L1;
4848
}
4949
}
50-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 15);
50+
invalid-expression "Switch case may fall through to the next case.";
5151
}
5252
#L4:
5353
case #C3:
@@ -58,7 +58,7 @@ static method main() → dynamic {
5858
finally {
5959
break #L1;
6060
}
61-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 22);
61+
invalid-expression "Switch case may fall through to the next case.";
6262
}
6363
#L5:
6464
case #C4:
@@ -69,7 +69,7 @@ static method main() → dynamic {
6969
}
7070
finally {
7171
}
72-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 28);
72+
invalid-expression "Switch case may fall through to the next case.";
7373
}
7474
#L6:
7575
case #C5:
@@ -79,7 +79,7 @@ static method main() → dynamic {
7979
}
8080
finally {
8181
}
82-
throw new core::FallThroughError::_create("org-dartlang-testcase:///switch_fall_through.dart", 33);
82+
invalid-expression "Switch case may fall through to the next case.";
8383
}
8484
#L7:
8585
case #C6:

pkg/front_end/testcases/weak.status

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dart2js/late_fields_with_annotation: SemiFuzzFailure # https://github.com/dart-l
1313
dart2js/mixin_super/main: SemiFuzzFailure # https://github.com/dart-lang/sdk/issues/49339
1414
dart2js/tear_off_patch/main: semiFuzzFailureOnForceRebuildBodies # needs custom libraries.json (and platform?) not setup here
1515
general/constants/with_unevaluated_agnostic/various_2: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242441
16+
general/fallthrough: RuntimeError # Fallthrough cases in switch.
1617
general/issue48765: semiFuzzFailureOnForceRebuildBodies # private class
1718
general/mixin_from_patch/main: semiFuzzFailureOnForceRebuildBodies # needs custom libraries.json (and platform?) not setup here
1819
general/multiple_class_patches/main: semiFuzzFailureOnForceRebuildBodies # needs custom libraries.json (and platform?) not setup here
@@ -32,17 +33,17 @@ macros/augment_concrete: SemiFuzzFailure # https://github.com/dart-lang/sdk/issu
3233
macros/extend_augmented: SemiFuzzFailure # Similar to https://github.com/dart-lang/sdk/issues/49414
3334
macros/multiple_augment_class: SemiFuzzFailure # https://github.com/dart-lang/sdk/issues/49990
3435
macros/multiple_imports: SemiFuzzFailure # probably augment imports that isn't split correctly.
36+
nnbd/constants: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242441
3537
nnbd_mixed/hierarchy/in_dill_out_in/in_out_in: SemiFuzzFailure # lots of stuff --- not digging in for now
3638
nnbd_mixed/hierarchy/in_out_dill_in/in_out_in: SemiFuzzFailure # lots of stuff --- not digging in for now
3739
nnbd_mixed/hierarchy/in_out_in: SemiFuzzFailure # lots of stuff --- not digging in for now
38-
nnbd_mixed/issue43988/main: SemiFuzzFailure # https://dart-review.googlesource.com/c/sdk/+/242540 and https://dart-review.googlesource.com/c/sdk/+/242446
3940
nnbd_mixed/issue43988/main.no_link: SemiFuzzFailure # https://dart-review.googlesource.com/c/sdk/+/242540 and https://dart-review.googlesource.com/c/sdk/+/242446
41+
nnbd_mixed/issue43988/main: SemiFuzzFailure # https://dart-review.googlesource.com/c/sdk/+/242540 and https://dart-review.googlesource.com/c/sdk/+/242446
4042
nnbd_mixed/member_inheritance_from_opt_in: SemiFuzzFailure # https://dart-review.googlesource.com/c/sdk/+/242446
4143
nnbd_mixed/mixed_mixin: SemiFuzzFailure
42-
nnbd/constants: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242441
44+
no_such_method_forwarders/abstract_accessors_from_field: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242444
4345
no_such_method_forwarders/abstract_accessors_from_field_one_defined: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242444
4446
no_such_method_forwarders/abstract_accessors_from_field_with_substitution: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242444
45-
no_such_method_forwarders/abstract_accessors_from_field: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242444
4647
no_such_method_forwarders/abstract_override_abstract_different_type: SemiFuzzFailure
4748
no_such_method_forwarders/abstract_override_with_different_signature: SemiFuzzFailure
4849
no_such_method_forwarders/default_argument_values: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242444

tools/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ CHANNEL dev
2727
MAJOR 2
2828
MINOR 19
2929
PATCH 0
30-
PRERELEASE 428
30+
PRERELEASE 429
3131
PRERELEASE_PATCH 0

0 commit comments

Comments
 (0)