diff --git a/Language/Classes/Constructors/Constant_Constructors/not_a_constant_in_initializer_list_t02.dart b/Language/Classes/Constructors/Constant_Constructors/not_a_constant_in_initializer_list_t02.dart index d7c0481e23..3534778bd5 100644 --- a/Language/Classes/Constructors/Constant_Constructors/not_a_constant_in_initializer_list_t02.dart +++ b/Language/Classes/Constructors/Constant_Constructors/not_a_constant_in_initializer_list_t02.dart @@ -15,6 +15,7 @@ /// @description Checks that it is a compile-time error when a constant /// constructor's initializer list contains a function call. /// @author iefremov +/// @issue 59804 f1() {} int f2() => 2; diff --git a/LanguageFeatures/Static-access-shorthand/constant_expression_A01_t03.dart b/LanguageFeatures/Static-access-shorthand/constant_expression_A01_t03.dart index 39c4dfb065..badcf834a6 100644 --- a/LanguageFeatures/Static-access-shorthand/constant_expression_A01_t03.dart +++ b/LanguageFeatures/Static-access-shorthand/constant_expression_A01_t03.dart @@ -29,7 +29,8 @@ class C { extension type const ET(String value) { const ET.id(this.value, [String s = ""]); - const factory ET.f(String value, {String s = ""}) = ET; + const ET.id2(this.value, {String s = ""}); + const factory ET.f(String value, {String s}) = ET.id2; } main() { diff --git a/LanguageFeatures/Static-access-shorthand/constant_expression_A02_t01.dart b/LanguageFeatures/Static-access-shorthand/constant_expression_A02_t01.dart index 0a12a6d4d5..33516d280b 100644 --- a/LanguageFeatures/Static-access-shorthand/constant_expression_A02_t01.dart +++ b/LanguageFeatures/Static-access-shorthand/constant_expression_A02_t01.dart @@ -28,11 +28,12 @@ class C { } mixin M { - final String value; - static const M instance = MO("M instance"); + static const M instance = MO(); +} +class MO with M { + final String value = "M instance"; + const MO(); } - -class MO = Object with M; extension type const ET(String value) { static const instance = ET("ET instance"); @@ -42,6 +43,9 @@ main() { const C c = .instance; Expect.equals("C instance", c.value); + const M m = .instance; + Expect.equals("M instance", (m as MO).value); + const ET et = .instance; Expect.equals("ET instance", et.value); }