Skip to content

[google_sign_in_ios, video_player] Specify types for pattern variable declarations - #13362

Merged
auto-submit[bot] merged 2 commits into
flutter:mainfrom
bkonyi:fix-pattern-variable-types
Oct 21, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:mainfrom
bkonyi:fix-pattern-variable-types

Conversation

@bkonyi

@bkonyi bkonyi commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Adds explicit type annotations to pattern-declared local variables where the matched value's type is not syntactically obvious to satisfy specify_nonobvious_local_variable_types (blocking https://dart-review.googlesource.com/c/sdk/+/548220).

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or I have commented below to indicate which [version change exemption] this PR falls under.
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style], or I have commented below to indicate which [CHANGELOG exemption] this PR falls under.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under.
  • All existing and new tests are passing.

… declarations

Adds explicit type annotations to pattern-declared local variables where the matched value's type is not syntactically obvious to satisfy `specify_nonobvious_local_variable_types`.
@bkonyi bkonyi added the CICD Run CI/CD label Oct 21, 2026
@bkonyi
bkonyi marked this pull request as ready for review October 21, 2026 15:47
@bkonyi bkonyi added the test-exempt Exempt from tests. Overrides `missing-tests` label label Oct 21, 2026
@bkonyi

bkonyi commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Test exemption: no logical changes

@bkonyi bkonyi added override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes labels Oct 21, 2026
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If both you and the PR author believe this PR qualifies for a test exemption, escalate to the tech lead for the changed area to review and apply the test-exempt label. All reviewers should feel empowered to ask for tests before escalating.

@bkonyi
bkonyi requested a review from elliette October 21, 2026 16:02

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the google_sign_in_ios package to version 6.3.9 and addresses the specify_nonobvious_local_variable_types lint in both the google_sign_in_ios and video_player packages. Specifically, it adds explicit type annotations to pattern variable declarations in google_sign_in_ios.dart and video_tracks_demo.dart. There are no review comments to address.

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 21, 2026
@auto-submit
auto-submit Bot merged commit 8e058b4 into flutter:main Oct 21, 2026
13 checks passed
GhagSagar23 pushed a commit to Kryonex-Labs/flutter that referenced this pull request Oct 22, 2026
flutter/packages@1383427...93baed9

2026-10-22 [email protected] [material_ui] Port flutter/flutter
flutter#186777 MaterialColor test (flutter/packages#12858)
2026-10-21 [email protected] [rfw] Migrate to material_ui
(flutter/packages#12811)
2026-10-21 [email protected] [cupertino_ui] Fix the installing
command of the cupertino_ui package (flutter/packages#13141)
2026-10-21 [email protected]
[cupertino_ui] Unskip web tests that pass on CanvasKit and Skwasm:
date_picker_test, spell_check_suggestions_toolbar_test
(flutter/packages#13367)
2026-10-21 [email protected] [video_player] Convert player classes
to Swift (flutter/packages#13197)
2026-10-21 [email protected] [camera_windows] Fall back to a physical
stream for cameras that reject preferred-stream selectors
(flutter/packages#12748)
2026-10-21 [email protected] [google_sign_in_ios, video_player] Specify
types for pattern variable declarations (flutter/packages#13362)
2026-10-21 [email protected] [google_maps_flutter_web] Issue 64073
implement my location (flutter/packages#12186)
2026-10-21 [email protected] [material_ui]
Unskip web tests that pass on CanvasKit and Skwasm: app_bar_theme_test,
input_decorator_test, paginated_data_table_test,
spell_check_suggestions_toolbar_test (flutter/packages#13352)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
copybara-service Bot pushed a commit to dart-lang/sdk that referenced this pull request Oct 22, 2026
This is a reland of commit 57129f5.

The original change was reverted due to flutter/packages analysis
failures on Flutter CI (Linux flutter_plugins). Fixes landed in
flutter/packages#13362 and flutter/flutter#195068 rolls the pinned
packages version in Flutter. The change itself is unchanged.

Original change's description:
> Consider pattern-introduced local variables non-obviously typed
>
> The lint `specify_nonobvious_local_variable_types` flags some local
> variable declarations expressed as identifier patterns in a pattern
> in a declaration context, but only when the initializing expression
> has a static type which is not considered obvious.
>
> This CL changes the approach such that these identifier patterns are
> flagged in every case, no matter which initializing expression the
> pattern variable declaration has. This makes sense because the type
> of a getter of an object cannot be determined other than by looking
> up the class/mixin/... which is denoted by the object pattern.
>
> For example, the type of `x` is not obvious in `var C(:x) = e;`,
> even in the case where `e` has an obvious type.
>
> A similar (though somewhat weaker) argument applies to other
> patterns. For example, `var [x] = <int>[1];` declares an `x`
> whose type is `int`. This may seem obvious, but it is still a
> two-step process to detect it, and it's less obvious with a
> declaration like `var [x] = myLocalVariable;` which would be given
> the same treatment. Hence, this CL considers all pattern-declared
> local variables non-obviously typed.
>
> Change-Id: I2d860b0acb08731de8457d79156c0c5fd7b85d71
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/548220
> Reviewed-by: Samuel Rawlins <[email protected]>
> Reviewed-by: Ben Konyi <[email protected]>
> Commit-Queue: Ben Konyi <[email protected]>

Change-Id: I9e0cd04901da37ac2599528b6f22734b9d727aa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/568020
Commit-Queue: Ben Konyi <[email protected]>
Reviewed-by: Samuel Rawlins <[email protected]>
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
flutter/packages@1383427...93baed9

2026-10-22 [email protected] [material_ui] Port flutter/flutter
flutter#186777 MaterialColor test (flutter/packages#12858)
2026-10-21 [email protected] [rfw] Migrate to material_ui
(flutter/packages#12811)
2026-10-21 [email protected] [cupertino_ui] Fix the installing
command of the cupertino_ui package (flutter/packages#13141)
2026-10-21 [email protected]
[cupertino_ui] Unskip web tests that pass on CanvasKit and Skwasm:
date_picker_test, spell_check_suggestions_toolbar_test
(flutter/packages#13367)
2026-10-21 [email protected] [video_player] Convert player classes
to Swift (flutter/packages#13197)
2026-10-21 [email protected] [camera_windows] Fall back to a physical
stream for cameras that reject preferred-stream selectors
(flutter/packages#12748)
2026-10-21 [email protected] [google_sign_in_ios, video_player] Specify
types for pattern variable declarations (flutter/packages#13362)
2026-10-21 [email protected] [google_maps_flutter_web] Issue 64073
implement my location (flutter/packages#12186)
2026-10-21 [email protected] [material_ui]
Unskip web tests that pass on CanvasKit and Skwasm: app_bar_theme_test,
input_decorator_test, paginated_data_table_test,
spell_check_suggestions_toolbar_test (flutter/packages#13352)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD missing-tests override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: google_sign_in p: video_player platform-ios test-exempt Exempt from tests. Overrides `missing-tests` label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants