Skip to content

Literals get type annotations. #3727

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

Merged
merged 1 commit into from
May 4, 2016
Merged

Literals get type annotations. #3727

merged 1 commit into from
May 4, 2016

Conversation

pq
Copy link
Contributor

@pq pq commented May 4, 2016

As per the recent fix to the always_specify_types lint (dart-lang/sdk#57296), literal maps and lists are now expected to be explicitly typed.

Running that lint on the repo identifies quite a few spots to update. This focuses on flutter_driver and flutter_sprites (somewhat arbitrarily) but the changes are fairly representative.

Note there are a number of places where I made a quick judgement on how specific to make the types. Feedback on those is welcome. (Especially as we move forward with more.)

As per the recent fix to the `always_specify_types` lint (https://github.com/dart-lang/linter/issues/199), literal maps and lists are now expected to be explicitly typed.

Running that lint on the repo identifies quite a few spots to update.  This focuses on `flutter_driver` and `flutter_sprites` (somewhat arbitrarily) but the changes are fairly representative.

Note there are a number of places where I made a quick judgement on how specific to make the types.  Feedback on those is welcome.  (Especially as we move forward with more.)
@pq
Copy link
Contributor Author

pq commented May 4, 2016

cc @Hixie @abarth

@abarth
Copy link
Contributor

abarth commented May 4, 2016

LGTM

@pq pq merged commit c2363c8 into flutter:master May 4, 2016
pq added a commit to pq/flutter that referenced this pull request May 4, 2016
The `flutter` package gets more types!

Follow-up from: flutter#3727.
@pq pq deleted the annotate_literals branch August 11, 2016 17:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants