dart-sdk/tests/language/nnbd/type_promotion
Sam Rawlins 5e040a20f8 analyzer: Improve span of use_of_nullable_value errors
This changes the span reported from the _receiver_ to
the _use_ (method name, property name, operator token).

I think this change is overall an improvement.
Specifically, its a great improvement for cmdline
output, where the receiver and the "use" are on
different lines.

One possibly weird change is that if the operator is `[]`,
then I only highlight the `[` character. I don't know if
there is a better place, and I think this is fine.

Fixes https://github.com/dart-lang/sdk/issues/43708

Change-Id: Ie66ddf04b4904a367575193106385dd63ee39985
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188680
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-02 02:43:48 +00:00
..
assignment_inference_after_null_check_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
assignment_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
conditional_both_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
do_condition_is_not_type_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
do_condition_is_type_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
do_outer_is_type_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
downwards_inference_error_test.dart Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
for_outer_is_type_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
function_expression_is_type_mutated_in_closure_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
function_expression_is_type_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
function_expression_outer_is_type_assigned_outside_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
if_is_not_type_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
if_is_type_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
logical_or_throw_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
null_type_insufficient_for_equals_null_check_error_test.dart analyzer: Improve span of use_of_nullable_value errors 2021-04-02 02:43:48 +00:00
promoted_lhs_used_as_assignment_context_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
try_catch_assigned_body_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
try_catch_catch_finally_outer_is_type_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
try_catch_is_not_type_exit_body_catch_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
try_catch_is_not_type_exit_body_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
try_finally_outer_is_type_assigned_body_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
try_finally_outer_is_type_assigned_finally_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
while_condition_false_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00
while_condition_true_test.dart Remove (most) uses of the "non-nullable" experiment flag. 2021-02-12 17:16:54 +00:00