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

analyzer: Allow read-only access to initializing formals. #26658

Closed
eernstg opened this issue Jun 8, 2016 · 3 comments
Closed

analyzer: Allow read-only access to initializing formals. #26658

eernstg opened this issue Jun 8, 2016 · 3 comments
Labels
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-enhancement A request for a change that isn't a bug

Comments

@eernstg
Copy link
Member

eernstg commented Jun 8, 2016

This is the analyzer specific issue for #26655. That issue has the details.

@floitschG floitschG added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Jun 8, 2016
@floitschG
Copy link
Contributor

floitschG commented Jun 9, 2016

Please also add a hint, when users capture the final parameter (and the field is not final). Otherwise there would be an observable difference between the captured variable and the variable in the body:

class A {
  var x;
  var f;
  A(this.x) : f = (() => x) {   // <=== warn here.
    x++;
    print(f());
  }
}

Erik will add (or update) tests to show the intended behavior.

@bwilkerson bwilkerson 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 labels Jun 9, 2016
@bwilkerson
Copy link
Member

I'm sure there are bugs in analyzer, but an initial implementation was added (https://codereview.chromium.org/2335693002/) that gives us the right semantics in terms of resolution.

I know that the requested hint hasn't been implemented yet.

@eernstg
Copy link
Member Author

eernstg commented Nov 30, 2016

The remaining steps in this task are taken in #27895, hence closing this one and marking it complete in #26655.

@eernstg eernstg closed this as completed Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants