Skip to content

"Test type arguments in operator ==(Object other)" is a very confusing error message #57892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pq opened this issue Jan 28, 2019 · 2 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-linter Issues with the analyzer's support for the linter package P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) type-ux A user experience or user interface related issue

Comments

@pq
Copy link
Member

pq commented Jan 28, 2019

From @Hixie on December 30, 2018 19:28

This code:

  @override
  bool operator ==(dynamic other) {
    if (other.runtimeType != runtimeType)
      return false;
    final AvatarImage typedOther = other as AvatarImage; // line 465
    return username == typedOther.username
        && photoManager == typedOther.photoManager
        && twitarr == typedOther.twitarr;
  }

Led to this message from the analyzer:

[info] Test type arguments in operator ==(Object other) (/home/ianh/dev/cruisemonkey/lib/src/logic/cruise.dart:465:36)

I have no idea what this means.

Copied from original issue: #35522

@pq pq added the P2 A bug or feature request we're likely to work on label Jan 28, 2019
@pq
Copy link
Member Author

pq commented Jan 28, 2019

From @Hixie on December 30, 2018 19:28

(See http://dart-lang.github.io/linter/lints/test_types_in_equals.html for what it actually means.)

@pq
Copy link
Member Author

pq commented Jan 28, 2019

From @Hixie on December 30, 2018 19:30

See also #35523 which is about the lint itself being bad. This specific issue is about the wording of the lint being unclear.

@srawlins srawlins added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Sep 12, 2019
@srawlins srawlins added the type-ux A user experience or user interface related issue label Apr 18, 2024
@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 18, 2024
@bwilkerson bwilkerson added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-linter Issues with the analyzer's support for the linter package P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) type-ux A user experience or user interface related issue
Projects
None yet
Development

No branches or pull requests

4 participants