Skip to content

Commit 2d91888

Browse files
authored
Prepare for NON_NULLABLE_EQUALS_PARAMETER diagnostic (#4523)
This prepares for the new [`NON_NULLABLE_EQUALS_PARAMETER`](osa1/sdk@48ee1f2) diagnostic discussed in https://github.com/dart-lang/linter/issues/3441.
1 parent 4d3d081 commit 2d91888

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

examples/misc/lib/effective_dart/design_bad.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// ignore_for_file: close_sinks, type_annotate_public_apis, unused_element, unused_local_variable, avoid_types_as_parameter_names
22
// ignore_for_file: type_init_formals, unused_field, always_declare_return_types, strict_raw_type, prefer_typing_uninitialized_variables
33
// ignore_for_file: use_function_type_syntax_for_parameters, prefer_generic_function_type_aliases, avoid_null_checks_in_equality_operators
4+
// ignore_for_file: non_nullable_equals_parameter
45

56
import 'dart:async';
67

examples/misc/lib/library_tour/core/hash_code.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Person {
1313
// You should generally implement operator `==` if you
1414
// override `hashCode`.
1515
@override
16-
bool operator ==(dynamic other) {
16+
bool operator ==(Object other) {
1717
return other is Person &&
1818
other.firstName == firstName &&
1919
other.lastName == lastName;

src/_guides/libraries/library-tour.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ class Person {
958958
// You should generally implement operator `==` if you
959959
// override `hashCode`.
960960
@override
961-
bool operator ==(dynamic other) {
961+
bool operator ==(Object other) {
962962
return other is Person &&
963963
other.firstName == firstName &&
964964
other.lastName == lastName;

0 commit comments

Comments
 (0)