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

"Find uses" fails to account for static binding of super invocations. #19694

Open
stereotype441 opened this issue Jun 27, 2014 · 6 comments
Open
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@stereotype441
Copy link
Member

With the following code:
  class A {
    f() { }
  }
  class B extends A {
    f() {
      super.f();
    }
  }
  class C extends B {
    f() {
      super.f();
    }
  }

"Find uses" on A.f() shows B.f() and C.f(). This is incorrect--C.f() does not call A.f().
"Find uses" on B.f() shows B.f() and C.f(). This is incorrect--B.f() does not call itself.
"Find uses" on C.f() shows B.f() and C.f(). This is incorrect--neither B.f() nor C.f() calls C.f().

It appears that "find uses" is failing to account for the fact that super invocations are not dynamic--they look up the callee in the superclass of the immediately enclosing class, regardless of the dynamic type of the object.

@clayberg
Copy link

Set owner to @scheglov.
Added this to the 1.6 milestone.
Removed Priority-Unassigned label.
Added Priority-Medium label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

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

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@sethladd
Copy link
Contributor

Removed Area-Editor label.
Added Area-Analyzer label.

@scheglov
Copy link
Contributor

The same decision as for https://code.google.com/p/dart/issues/detail?id=19697
Maybe, but not now.


Removed the owner.
Removed Type-Defect label.
Added Type-Enhancement, Analyzer-Server labels.

@stereotype441 stereotype441 added Type-Enhancement area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-server labels Sep 16, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
@srawlins
Copy link
Member

srawlins commented Oct 9, 2023

Oddly enough, all of the issues reported above are still present!

@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed type-enhancement A request for a change that isn't a bug labels Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

7 participants