diff --git a/LanguageFeatures/Patterns/map_A01_t01.dart b/LanguageFeatures/Patterns/map_A01_t01.dart index db327b57c6..9fc06872e8 100644 --- a/LanguageFeatures/Patterns/map_A01_t01.dart +++ b/LanguageFeatures/Patterns/map_A01_t01.dart @@ -67,7 +67,7 @@ String test(Map map) { {11: {"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" }; } diff --git a/LanguageFeatures/Patterns/map_A01_t02.dart b/LanguageFeatures/Patterns/map_A01_t02.dart index 07ee306aa1..dcbd5a6089 100644 --- a/LanguageFeatures/Patterns/map_A01_t02.dart +++ b/LanguageFeatures/Patterns/map_A01_t02.dart @@ -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"; diff --git a/LanguageFeatures/Patterns/map_A01_t03.dart b/LanguageFeatures/Patterns/map_A01_t03.dart index a088a985a8..6650de4368 100644 --- a/LanguageFeatures/Patterns/map_A01_t03.dart +++ b/LanguageFeatures/Patterns/map_A01_t03.dart @@ -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";