From a6fe06af364dffe79cb27c873801dd0d4548a277 Mon Sep 17 00:00:00 2001 From: Johnni Winther Date: Tue, 12 Oct 2021 16:06:09 +0000 Subject: [PATCH] Fix language/const/constant_type_variable_error_test Change-Id: I8f2c65485d694db1a831f6778e3b6a03c280c638 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216288 Reviewed-by: Erik Ernst Commit-Queue: Johnni Winther --- .../constant_type_variable_error_test.dart | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/language/const/constant_type_variable_error_test.dart b/tests/language/const/constant_type_variable_error_test.dart index c0e7770690b..6e2438b57e9 100644 --- a/tests/language/const/constant_type_variable_error_test.dart +++ b/tests/language/const/constant_type_variable_error_test.dart @@ -8,41 +8,49 @@ // constant expressions or potentially constant type expressions. class A { - final Object x1, x2, x3, x4, x5, x6, x7, x8, x9; + final Object x1, x2, x3, x4, x5, x6, x7, x8; const A() : x1 = const [X], //^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Type variables can't be used as constants. x2 = const [], //^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Type variables can't be used as constants. x3 = const {X}, //^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Type variables can't be used as constants. x4 = const {}, //^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Type variables can't be used as constants. x5 = const {X: null}, //^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Type variables can't be used as constants. x6 = const {}, //^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Type variables can't be used as constants. x7 = const B(), //^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Type variables can't be used as constants. x8 = const C(X); //^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Type variables can't be used as constants. } class B {