Skip to content
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

dart compiler understand "super!=()", but dart2js does not. #14620

Closed
DartBot opened this issue Oct 30, 2013 · 4 comments
Closed

dart compiler understand "super!=()", but dart2js does not. #14620

DartBot opened this issue Oct 30, 2013 · 4 comments
Labels
closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js

Comments

@DartBot
Copy link

DartBot commented Oct 30, 2013

This issue was originally filed by igor.ko...@mailvision.com


Example:

  bool operator==(Object o) {
    if (o is! Contact){
      return false;
    }
    Contact other = o as Contact;
    if(!areParametersEquals(other))
      return false;
    if( super!=(other) ) // !!!!!
      return false;
    return true;
  }

It works in dart, but not in dart2js:

dart2js: Error: '!=' cannot be called on super.

If change the code to
    return super==(other);
it passed compilation both in dart and dart2js

 Dart Editor version 0.8.7_r29341
 Dart SDK version 0.8.7.0_r29341
 Windows 7 32-bits

@floitschG
Copy link
Contributor

Added Area-Dart2JS, Triaged labels.

@kasperl
Copy link

kasperl commented Oct 30, 2013

Thanks for the bug report! I assume that

   if (!(super == other)) return false;

is an acceptable workaround for now.


Added this to the Later milestone.
Removed Priority-Unassigned label.
Added Priority-Medium label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed triaged labels Feb 29, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js
Projects
None yet
Development

No branches or pull requests

5 participants