48ee1f218d
This rule checks that a parameter to an `operator ==` implementation has a non-nullable type. I intentionally did not enforce, in this rule, that the parameter is exactly `Object`. It is legal to narrow the parameter type to a different non-nullable type, like `int`. I can't imagine doing it, but it seems to be unrelated to whether the type should be nullable or not. Fixes https://github.com/dart-lang/linter/issues/3441 Replaces https://github.com/dart-lang/linter/pull/3923 Change-Id: I61d4a7b1ab8318dc9403da1633c352de95bfac61 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277700 Reviewed-by: Mark Zhou <markzipan@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>