Skip to content

Commit

Permalink
Fixes dart-lang#1637. Missed 'const' keywords added to some patterns …
Browse files Browse the repository at this point in the history
…tests
  • Loading branch information
sgrekhov committed Jan 4, 2023
1 parent 41459e1 commit 5a9d4bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LanguageFeatures/Patterns/map_A01_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ String test(Map map) {
{11: <String, String>{"1": _}} => "map-2",
{12: (var x,)} => "record-1",
{12: (42, x: 0)} => "record-2",
{13: Square(size: Unit(1))} => "object",
{13: Square(size: const Unit(1))} => "object",
_ => "default"
};
}
Expand Down
2 changes: 1 addition & 1 deletion LanguageFeatures/Patterns/map_A01_t02.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ String test(Map map) {
return "record-1";
case {12: (42, x: 0)}:
return "record-2";
case {13: Square(size: Unit(1))}:
case {13: Square(size: const Unit(1))}:
return "object";
default:
return "default";
Expand Down
2 changes: 1 addition & 1 deletion LanguageFeatures/Patterns/map_A01_t03.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ String test(Map map) {
if (map case {12: (42, x: 0)}) {
return "record-2";
}
if (map case {13: Square(size: Unit(1))}) {
if (map case {13: Square(size: const Unit(1))}) {
return "object";
}
return "default";
Expand Down

0 comments on commit 5a9d4bf

Please sign in to comment.