From eae75026fa121dfd141843c92f96a75f666c046f Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Mon, 20 Apr 2020 02:39:25 +0000 Subject: [PATCH] Update tests after rename to UNCHECKED_USE_OF_NULLABLE_VALUE. R=brianwilkerson@google.com Change-Id: I51544b0955a906920aa80ae30aa9ecbf80294baf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144006 Reviewed-by: Brian Wilkerson Commit-Queue: Konstantin Shcheglov --- .../control_flow_collections/await_for_null_test.dart | 6 +++--- .../control_flow_collections/for_downcast_test.dart | 6 +++--- .../control_flow_collections/for_null_condition_test.dart | 6 +++--- .../control_flow_collections/if_null_condition_test.dart | 6 +++--- .../null_aware_subscript_produces_nullable_type_test.dart | 6 +++--- .../nnbd/resolution/question_question_lub_test.dart | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/language/control_flow_collections/await_for_null_test.dart b/tests/language/control_flow_collections/await_for_null_test.dart index 492e153fe84..a8f41543d58 100644 --- a/tests/language/control_flow_collections/await_for_null_test.dart +++ b/tests/language/control_flow_collections/await_for_null_test.dart @@ -8,14 +8,14 @@ void main() async { Stream? nullStream; var a = [await for (var i in nullStream) 1]; // ^^^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. var b = {await for (var i in nullStream) 1: 1}; // ^^^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. var c = {await for (var i in nullStream) 1}; // ^^^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'Stream?' used in the 'for' loop must implement 'Stream'. } diff --git a/tests/language/control_flow_collections/for_downcast_test.dart b/tests/language/control_flow_collections/for_downcast_test.dart index e16067eb152..f8572956eb3 100644 --- a/tests/language/control_flow_collections/for_downcast_test.dart +++ b/tests/language/control_flow_collections/for_downcast_test.dart @@ -117,14 +117,14 @@ void testNullIterable() { Iterable? nullIterable = null; var a = [for (var i in nullIterable) 1]; // ^^^^^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. var b = {for (var i in nullIterable) 1: 1}; // ^^^^^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. var c = {for (var i in nullIterable) 1}; // ^^^^^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] The type 'Iterable?' used in the 'for' loop must implement 'Iterable'. } diff --git a/tests/language/control_flow_collections/for_null_condition_test.dart b/tests/language/control_flow_collections/for_null_condition_test.dart index e88d665c1da..31b02b981a6 100644 --- a/tests/language/control_flow_collections/for_null_condition_test.dart +++ b/tests/language/control_flow_collections/for_null_condition_test.dart @@ -9,14 +9,14 @@ void main() { bool? nullBool = null; var a = [for (; nullBool;) 1]; // ^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. var b = {for (; nullBool;) 1: 1}; // ^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. var c = {for (; nullBool;) 1}; // ^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } diff --git a/tests/language/control_flow_collections/if_null_condition_test.dart b/tests/language/control_flow_collections/if_null_condition_test.dart index 4e613c24e21..667c6bd1d93 100644 --- a/tests/language/control_flow_collections/if_null_condition_test.dart +++ b/tests/language/control_flow_collections/if_null_condition_test.dart @@ -6,16 +6,16 @@ void main() { bool? nullBool; var a = [if (nullBool) 1]; // ^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. var b = {if (nullBool) 1: 1}; // ^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. var c = {if (nullBool) 1}; // ^^^^^^^^ - // [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE + // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'. } diff --git a/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart b/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart index c4f6385a8c1..43472fdbfa1 100644 --- a/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart +++ b/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart @@ -19,7 +19,7 @@ void f1(NotGeneric x) { void f2(NotGeneric? x) { x?[0] + 1; //^^^^^ -// [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE +// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] unspecified x?[0] = 1; useNonNullable(x?[0] = 1); @@ -46,14 +46,14 @@ void f2(NotGeneric? x) { void f3(Generic? x) { x?[0] + 1; //^^^^^ -// [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE +// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] unspecified } void f4(Generic x) { x[0] + 1; //^^^^ -// [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE +// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] unspecified } diff --git a/tests/language/nnbd/resolution/question_question_lub_test.dart b/tests/language/nnbd/resolution/question_question_lub_test.dart index b050b2ae9cc..830c848593f 100644 --- a/tests/language/nnbd/resolution/question_question_lub_test.dart +++ b/tests/language/nnbd/resolution/question_question_lub_test.dart @@ -16,13 +16,13 @@ void f1( (nullableInt ?? nonNullInt) + 1; (nullableInt ?? nullableInt) + 1; //^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE +// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] unspecified (nonNullInt ?? nullableInt) + 1; // ^^^^^^^^^^^ // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION //^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] STATIC_WARNING.USE_OF_NULLABLE_VALUE +// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] unspecified (nonNullInt ?? nonNullInt) + 1; // ^^^^^^^^^^