Skip to content

unary prefix operator (logical compliment) gives strange compiler warning #3187

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

Closed
DartBot opened this issue May 23, 2012 · 5 comments
Closed
Assignees
Labels
closed-obsolete Closed as the reported issue is no longer relevant legacy-area-analyzer Use area-devexp instead.
Milestone

Comments

@DartBot
Copy link

DartBot commented May 23, 2012

This issue was originally filed by @bp74


What steps will reproduce the problem?

class foo {
  num a, b;
  foo(this.a, this.b);
  
  num get a2() => this.a;
  num get b2() => this.b;
 
  check()
  {
    if (!(this.a2 >= this.b2)) { /* compiler warning / }
    if (this.a2 >= this.b2) { /
okay / }
    if (!(a2 >= b2)) { /
okay */ }
  }
}

What is the expected output? What do you see instead?

For the code shown above, you get this compiler warning:
() -> num has no method named "operator >="

The 2nd and 3rd "if" statement gives no warning!

What version of the product are you using? On what operating system?
Dart Editor 7916 32 bit, Windows 7 64 bit

@DartBot
Copy link
Author

DartBot commented May 23, 2012

This comment was originally written by @bp74


hhmmm ... sorry about the "dart2js" in the subject, is this the compiler or just a source analyzer? Anyway you get the idea :)

@kasperl
Copy link

kasperl commented May 24, 2012

Added Area-Analyzer, Triaged labels.
Changed the title to: "unary prefix operator (logical compliment) gives strange compiler warning".

@DartBot
Copy link
Author

DartBot commented May 25, 2012

This comment was originally written by @bp74


Tested with Dart Editor Build 7992: the issue is solved.

@danrubel
Copy link

danrubel commented Jun 4, 2012

Added this to the M1 milestone.

@scheglov
Copy link
Contributor

scheglov commented Jun 5, 2012

Set owner to @scheglov.
Added AssumedStale label.

@DartBot DartBot added Type-Defect legacy-area-analyzer Use area-devexp instead. closed-obsolete Closed as the reported issue is no longer relevant labels Jun 5, 2012
@DartBot DartBot added this to the M1 milestone Jun 5, 2012
copybara-service bot pushed a commit that referenced this issue Oct 29, 2021
Changes:
```
> git log --format="%C(auto) %h %s" 78bc50c..0035a40
 https://dart.googlesource.com/pub.git/+/0035a40f Fix echo mode crash on `token add` (#3194)
 https://dart.googlesource.com/pub.git/+/a75a8c17 Don't warn against discontinued transitive dependencies (#3195)
 https://dart.googlesource.com/pub.git/+/cf2ed105 Fix analytics code (#3197)
 https://dart.googlesource.com/pub.git/+/08e13f7b Remove unused golden files (#3189)
 https://dart.googlesource.com/pub.git/+/b6293b80 Fix log message related to `pub global activate`  (#3187)
 https://dart.googlesource.com/pub.git/+/94f6b477 Introducing command-line interface tests (#3161)
 https://dart.googlesource.com/pub.git/+/3ba8134f More details from getExecutableForCommand (#3186)
 https://dart.googlesource.com/pub.git/+/a2dbcfff Shorthand syntax for hosted dependencies (#3133)
 https://dart.googlesource.com/pub.git/+/435e4e3f Shuffle analytics (#3185)

```

Diff: https://dart.googlesource.com/pub.git/+/78bc50c7833451c24e531713362e46fd50621ff0~..0035a40f25d027130c0314571da53ffafc6d973b/
Change-Id: Idfd7c382985d1ad3e3ad87a621dc79d3b74e898e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218620
Reviewed-by: Jonas Jensen <[email protected]>
Commit-Queue: Sigurd Meldgaard <[email protected]>
copybara-service bot pushed a commit that referenced this issue Sep 27, 2022
…2 revisions)

https://dart.googlesource.com/dartdoc/+log/22facbb145d7..a6676ee58628

2022-09-27 [email protected] client search cleanup (#3186)
2022-09-27 [email protected] tool/grind.dart: cleanup directory signature calculation (#3187)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: [email protected]
Change-Id: I0ff3cb34bb645b5e084a562862718e303e581643
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261261
Commit-Queue: DEPS Autoroller <[email protected]>
Commit-Queue: Nate Bosch <[email protected]>
Reviewed-by: Nate Bosch <[email protected]>
This issue was closed.
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 legacy-area-analyzer Use area-devexp instead.
Projects
None yet
Development

No branches or pull requests

4 participants