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

Incremental resolution inconsistency handles propagated type of final fields #24503

Closed
stereotype441 opened this issue Oct 5, 2015 · 5 comments
Assignees
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

Comments

@stereotype441
Copy link
Member

With the new task model disabled, paste the following code into an empty file:

class Y {
  final x='hi';
  mth() {
    x.
  }
}

Then place the cursor after x. and request completions. Completions such as length and substring (which come from the String class) are shown.

Now delete the ., retype it, and request completions again if necessary (note that most editors automatically request completions when . is typed). Now the only completions shown are those defined on Object, such as hashCode and runtimeType.

It appears that incremental resolution is not reproducing the propagated type of x.

@stereotype441 stereotype441 added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Oct 5, 2015
@scheglov
Copy link
Contributor

scheglov commented Oct 6, 2015

Paul, what do you consider a bug - the fact that we get propagated type initially, or the fact that we lose it after incremental resolution? It seems that the last one. But AFAIK we decided that we don't propagate types for fields in the old task model. So, it should not have been set at all.

@scheglov
Copy link
Contributor

scheglov commented Oct 6, 2015

Disabling propagated types for properties.
https://codereview.chromium.org/1386033003

@stereotype441
Copy link
Member Author

Getting inconsistent results from incremental vs. non-incremental resolution concerns me most, and it looks like your CL fixes that. I suspect that not too long from now we're going to need to start doing type propagation on final instance fields (judging by the high priority assigned to issue #23001, which is the parallel issue for top level final variables). But we can address that in a separate effort.

@bwilkerson
Copy link
Member

Note that with the support for strong mode we have all the plumbing in place. It should be fairly easy to implement this after we've moved to the new task model. (On the other hand, it becomes completely moot for folks using strong mode.)

scheglov added a commit that referenced this issue Oct 6, 2015
R=brianwilkerson@google.com, paulberry@google.com
BUG= #24503

Review URL: https://codereview.chromium.org/1386033003 .
@scheglov
Copy link
Contributor

scheglov commented Oct 6, 2015

Done.
ef434d6

@scheglov scheglov closed this as completed Oct 6, 2015
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on and removed Priority-Medium labels Mar 1, 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
Projects
None yet
Development

No branches or pull requests

4 participants