Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 9e119d1

Browse files
committed
Feedback
1 parent 4e41519 commit 9e119d1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/src/rules/non_nullable_equals_parameter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class _Visitor extends SimpleAstVisitor<void> {
7878
return;
7979
}
8080

81-
if (parameters.parameters.isEmpty) {
81+
if (parameters.parameters.length != 1) {
8282
return;
8383
}
8484

test/rules/non_nullable_equals_parameter_test.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ class D extends C {
3636
''');
3737
}
3838

39+
test_class_nonNullableParameter_narrowedType() async {
40+
await assertNoDiagnostics(r'''
41+
class C {
42+
bool operator ==(int other) => other is C;
43+
}
44+
''');
45+
}
46+
3947
test_class_nullableParameter() async {
4048
await assertDiagnostics(r'''
4149
class C {

0 commit comments

Comments
 (0)