diff --git a/Language/Statements/Continue/label_t07.dart b/Language/Statements/Continue/label_t07.dart index f4aa0cbcc4..d90c241def 100644 --- a/Language/Statements/Continue/label_t07.dart +++ b/Language/Statements/Continue/label_t07.dart @@ -22,7 +22,7 @@ main() { case 1: x = 0; continue L; - // ^^^^^^^^^^^ + // ^ // [analyzer] COMPILE_TIME_ERROR.CONTINUE_LABEL_INVALID // ^^^^^^^^ // [cfe] A 'continue' label must be on a loop or a switch member. diff --git a/LanguageFeatures/Patterns/constant_A02_t18.dart b/LanguageFeatures/Patterns/constant_A02_t18.dart index b933a6474e..fc25dba7c6 100644 --- a/LanguageFeatures/Patterns/constant_A02_t18.dart +++ b/LanguageFeatures/Patterns/constant_A02_t18.dart @@ -43,7 +43,7 @@ String test(p.Color value) { p.Color.white => "white", p.Color.red => "red", p.Color.yellow => "yellow", - p.Color.blue => "default", + p.Color.blue => "blue", p.Color.black => "black", _ => "default" }; diff --git a/LanguageFeatures/Patterns/record_A01_t03.dart b/LanguageFeatures/Patterns/record_A01_t03.dart index a5369adc67..7576f22e85 100644 --- a/LanguageFeatures/Patterns/record_A01_t03.dart +++ b/LanguageFeatures/Patterns/record_A01_t03.dart @@ -140,7 +140,8 @@ main() { Expect.equals("list-2", test((10, ["42", 42, 0]))); Expect.equals("default", test((10, [Object(), 42]))); Expect.equals("map-1", test((11, {1: 42}))); - Expect.equals("map-2", test((11, {"1": 42}))); + Expect.equals("map-2", test((11, {"1": "42"}))); + Expect.equals("default", test((11, {"1": 42}))); Expect.equals("default", test((11, {Object(): 42}))); Expect.equals("record-1 = 42", test((12, (42,)))); Expect.equals("record-2", test((12, (42, x: 0)))); diff --git a/LanguageFeatures/Patterns/record_A01_t06.dart b/LanguageFeatures/Patterns/record_A01_t06.dart index eb01eab36d..efeb0957c5 100644 --- a/LanguageFeatures/Patterns/record_A01_t06.dart +++ b/LanguageFeatures/Patterns/record_A01_t06.dart @@ -140,7 +140,8 @@ main() { Expect.equals("list-2", test((n10: ["42", 42, 0]))); Expect.equals("default", test((n10: [Object(), 42]))); Expect.equals("map-1", test((n11: {1: 42}))); - Expect.equals("map-2", test((n11: {"1": 42}))); + Expect.equals("map-2", test((n11: {"1": "42"}))); + Expect.equals("default", test((n11: {"1": 42}))); Expect.equals("default", test((n11: {Object(): 42}))); Expect.equals("record-1 = 42", test((n12: (42,)))); Expect.equals("record-2", test((n12: (42, x: 0)))); diff --git a/LanguageFeatures/Patterns/switch_expression_A03_t04.dart b/LanguageFeatures/Patterns/switch_expression_A03_t04.dart index 9c72a67a8f..bf1c82d9eb 100644 --- a/LanguageFeatures/Patterns/switch_expression_A03_t04.dart +++ b/LanguageFeatures/Patterns/switch_expression_A03_t04.dart @@ -109,5 +109,5 @@ main() { Expect.equals(1, test3("three", "two")); Expect.equals(1, test4("three", "two")); Expect.equals(3, test5("one", "two")); - Expect.equals(-1, test5("one", "two")); + Expect.equals(-1, test6("one", "two")); } diff --git a/LanguageFeatures/Patterns/switch_expression_A03_t13.dart b/LanguageFeatures/Patterns/switch_expression_A03_t13.dart index 005c37b8e4..48dc5fd478 100644 --- a/LanguageFeatures/Patterns/switch_expression_A03_t13.dart +++ b/LanguageFeatures/Patterns/switch_expression_A03_t13.dart @@ -75,13 +75,13 @@ main() { Expect.equals(3, x); x %= switch("two") { - "two" => 1, + "two" => 2, _ => 0 }; Expect.equals(1, x); x ~/= switch("two") { - "two" => 1, + "two" => 2, _ => 0 }; Expect.equals(0, x); diff --git a/LanguageFeatures/Patterns/variable_A02_t05.dart b/LanguageFeatures/Patterns/variable_A02_t05.dart index 3e0a67d0c1..945cd92701 100644 --- a/LanguageFeatures/Patterns/variable_A02_t05.dart +++ b/LanguageFeatures/Patterns/variable_A02_t05.dart @@ -68,14 +68,14 @@ String test3(Map m) { main() { Expect.equals("{1: x}", test1({1: "x"})); - Expect.equals("{1: 2]", test1({1: 2})); + Expect.equals("{1: 2}", test1({1: 2})); Expect.equals("default", test1({1: true})); Expect.equals("{1: x}", test2({1: "x"})); - Expect.equals("{1: 2]", test2({1: 2})); + Expect.equals("{1: 2}", test2({1: 2})); Expect.equals("default", test2({1: true})); Expect.equals("{1: x}", test3({1: "x"})); - Expect.equals("{1: 2]", test3({1: 2})); + Expect.equals("{1: 2}", test3({1: 2})); Expect.equals("default", test3({1: true})); }