[XL] Change in dart/sdk[main]: Issue 51137. Don't use the type inferred from the initializer to reso...

0 views
Skip to first unread message

Konstantin Shcheglov (Gerrit)

unread,
Feb 7, 2023, 5:45:59 PM2/7/23
to Samuel Rawlins, Brian Wilkerson, rev...@dartlang.org

Attention is currently required from: Brian Wilkerson, Samuel Rawlins.

Konstantin Shcheglov would like Samuel Rawlins and Brian Wilkerson to review this change.

View Change

Issue 51137. Don't use the type inferred from the initializer to resolve the initializer.

Bug: https://github.com/dart-lang/sdk/issues/51137
Change-Id: I5979e2531b285d86141d60cd844919456ff17c47
---
M pkg/analyzer/lib/src/dart/analysis/driver.dart
M pkg/analyzer/lib/src/dart/element/element.dart
M pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
M pkg/analyzer/lib/src/dart/element/type_system.dart
D pkg/analyzer/lib/src/dart/error/inference_error_listener.dart
M pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart
M pkg/analyzer/lib/src/dart/resolver/invocation_inferrer.dart
M pkg/analyzer/lib/src/dart/resolver/variable_declaration_resolver.dart
M pkg/analyzer/lib/src/generated/resolver.dart
M pkg/analyzer/lib/src/summary2/ast_resolver.dart
M pkg/analyzer/lib/src/summary2/element_flags.dart
M pkg/analyzer/lib/src/summary2/top_level_inference.dart
M pkg/analyzer/lib/src/task/inference_error.dart
M pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart
M pkg/analyzer/test/src/diagnostics/could_not_infer_test.dart
M pkg/analyzer/test/src/diagnostics/inference_failure_on_function_invocation_test.dart
M pkg/analyzer/test/src/diagnostics/inference_failure_on_generic_invocation_test.dart
M pkg/analyzer/test/src/diagnostics/inference_failure_on_instance_creation_test.dart
M pkg/analyzer/test/src/summary/element_text.dart
M pkg/analyzer/test/src/summary/elements_test.dart
M pkg/analyzer/test/src/summary/macro_test.dart
M pkg/analyzer/test/src/summary/top_level_inference_test.dart
M pkg/nnbd_migration/lib/src/fix_builder.dart
23 files changed, 1,459 insertions(+), 334 deletions(-)


To view, visit change 281462. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I5979e2531b285d86141d60cd844919456ff17c47
Gerrit-Change-Number: 281462
Gerrit-PatchSet: 2
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-MessageType: newchange

Konstantin Shcheglov (Gerrit)

unread,
Feb 7, 2023, 5:46:00 PM2/7/23
to rev...@dartlang.org, Brian Wilkerson, Samuel Rawlins, CBuild, Commit Queue

Attention is currently required from: Brian Wilkerson, Samuel Rawlins.

View Change

    To view, visit change 281462. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I5979e2531b285d86141d60cd844919456ff17c47
    Gerrit-Change-Number: 281462
    Gerrit-PatchSet: 2
    Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
    Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Comment-Date: Tue, 07 Feb 2023 22:45:55 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Brian Wilkerson (Gerrit)

    unread,
    Feb 7, 2023, 5:51:59 PM2/7/23
    to Konstantin Shcheglov, rev...@dartlang.org, Brian Wilkerson, Samuel Rawlins, CBuild, Commit Queue

    Attention is currently required from: Konstantin Shcheglov, Samuel Rawlins.

    Patch set 2:Code-Review +1

    View Change

      To view, visit change 281462. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I5979e2531b285d86141d60cd844919456ff17c47
      Gerrit-Change-Number: 281462
      Gerrit-PatchSet: 2
      Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Attention: Konstantin Shcheglov <sche...@google.com>
      Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
      Gerrit-Comment-Date: Tue, 07 Feb 2023 22:51:52 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      Samuel Rawlins (Gerrit)

      unread,
      Feb 7, 2023, 6:27:30 PM2/7/23
      to Konstantin Shcheglov, rev...@dartlang.org, Brian Wilkerson, CBuild, Commit Queue

      Attention is currently required from: Konstantin Shcheglov.

      Patch set 2:Code-Review +1

      View Change

      2 comments:

      • Patchset:

      • File pkg/analyzer/lib/src/dart/element/generic_inferrer.dart:

      To view, visit change 281462. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I5979e2531b285d86141d60cd844919456ff17c47
      Gerrit-Change-Number: 281462
      Gerrit-PatchSet: 2
      Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
      Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
      Gerrit-Attention: Konstantin Shcheglov <sche...@google.com>
      Gerrit-Comment-Date: Tue, 07 Feb 2023 23:27:23 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      Konstantin Shcheglov (Gerrit)

      unread,
      Feb 8, 2023, 12:46:08 PM2/8/23
      to rev...@dartlang.org, Samuel Rawlins, Brian Wilkerson, CBuild, Commit Queue

      Attention is currently required from: Konstantin Shcheglov.

      Patch set 3:Commit-Queue +2

      View Change

        To view, visit change 281462. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: I5979e2531b285d86141d60cd844919456ff17c47
        Gerrit-Change-Number: 281462
        Gerrit-PatchSet: 3
        Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
        Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
        Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
        Gerrit-Attention: Konstantin Shcheglov <sche...@google.com>
        Gerrit-Comment-Date: Wed, 08 Feb 2023 17:46:04 +0000

        Commit Queue (Gerrit)

        unread,
        Feb 8, 2023, 12:52:26 PM2/8/23
        to Konstantin Shcheglov, rev...@dartlang.org, Samuel Rawlins, Brian Wilkerson, CBuild

        Commit Queue submitted this change.

        View Change



        2 is the latest approved patch-set.
        No files were changed between the latest approved patch-set and the submitted one.

        Approvals: Konstantin Shcheglov: Commit Brian Wilkerson: Looks good to me, approved Samuel Rawlins: Looks good to me, approved
        Issue 51137. Don't use the type inferred from the initializer to resolve the initializer.

        Bug: https://github.com/dart-lang/sdk/issues/51137
        Change-Id: I5979e2531b285d86141d60cd844919456ff17c47
        Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281462
        Reviewed-by: Brian Wilkerson <brianwi...@google.com>
        Reviewed-by: Samuel Rawlins <sraw...@google.com>
        Commit-Queue: Konstantin Shcheglov <sche...@google.com>

        ---
        M pkg/analyzer/lib/src/dart/analysis/driver.dart
        M pkg/analyzer/lib/src/dart/element/element.dart
        M pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
        M pkg/analyzer/lib/src/dart/element/type_system.dart
        D pkg/analyzer/lib/src/dart/error/inference_error_listener.dart
        M pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart
        M pkg/analyzer/lib/src/dart/resolver/invocation_inferrer.dart
        M pkg/analyzer/lib/src/dart/resolver/variable_declaration_resolver.dart
        M pkg/analyzer/lib/src/generated/resolver.dart
        M pkg/analyzer/lib/src/summary2/ast_resolver.dart
        M pkg/analyzer/lib/src/summary2/element_flags.dart
        M pkg/analyzer/lib/src/summary2/top_level_inference.dart
        M pkg/analyzer/lib/src/task/inference_error.dart
        M pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart
        M pkg/analyzer/test/src/diagnostics/could_not_infer_test.dart
        M pkg/analyzer/test/src/diagnostics/inference_failure_on_function_invocation_test.dart
        M pkg/analyzer/test/src/diagnostics/inference_failure_on_generic_invocation_test.dart
        M pkg/analyzer/test/src/diagnostics/inference_failure_on_instance_creation_test.dart
        M pkg/analyzer/test/src/summary/element_text.dart
        M pkg/analyzer/test/src/summary/elements_test.dart
        M pkg/analyzer/test/src/summary/macro_test.dart
        M pkg/analyzer/test/src/summary/top_level_inference_test.dart
        M pkg/nnbd_migration/lib/src/fix_builder.dart
        23 files changed, 1,463 insertions(+), 334 deletions(-)


        To view, visit change 281462. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: I5979e2531b285d86141d60cd844919456ff17c47
        Gerrit-Change-Number: 281462
        Gerrit-PatchSet: 4
        Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
        Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
        Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
        Gerrit-MessageType: merged

        CBuild (Gerrit)

        unread,
        Feb 8, 2023, 1:26:11 PM2/8/23
        to Konstantin Shcheglov, Commit Queue, rev...@dartlang.org, Samuel Rawlins, Brian Wilkerson

        go/dart-cbuild result: SUCCESS

        Details: https://goto.google.com/dart-cbuild/find/0a93b04d66f43669c5343e5e356a6daca23b6650

        View Change

          To view, visit change 281462. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: I5979e2531b285d86141d60cd844919456ff17c47
          Gerrit-Change-Number: 281462
          Gerrit-PatchSet: 4
          Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
          Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
          Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
          Gerrit-Comment-Date: Wed, 08 Feb 2023 18:26:07 +0000
          Reply all
          Reply to author
          Forward
          0 new messages