Skip to content

Analyzer top level inference doesn't work with optional new/const #32397

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
leafpetersen opened this issue Mar 2, 2018 · 1 comment
Closed
Assignees
Labels
legacy-area-analyzer Use area-devexp instead.

Comments

@leafpetersen
Copy link
Member

In the code below, a0 is inferred as type dynamic unless I add new in front of the constructor call to Baz.

class Baz {

}

var a0 = Baz();

void main() {
  int x = a0;
}
@scheglov
Copy link
Contributor

scheglov commented Mar 9, 2018

@scheglov scheglov closed this as completed Mar 9, 2018
dart-bot pushed a commit that referenced this issue Mar 9, 2018
[email protected]

Bug: #32397
Change-Id: Idec5867cfd0ac3e6c0f650afb7f282e66aea91ce
Reviewed-on: https://dart-review.googlesource.com/45880
Reviewed-by: Brian Wilkerson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-analyzer Use area-devexp instead.
Projects
None yet
Development

No branches or pull requests

2 participants