)]}'
{
  "commit": "fe6f87f1370925450b6a8dc1be686bcbd143515b",
  "tree": "09128292d5ef2bd5936d05bdf1114dc0ef7e2935",
  "parents": [
    "29c24dbe2728ec7f3a2895a51ddb8aa0f2fb7d23"
  ],
  "author": {
    "name": "Paul Berry",
    "email": "paulberry@google.com",
    "time": "Tue Mar 04 13:00:20 2025 -0800"
  },
  "committer": {
    "name": "Commit Queue",
    "email": "dart-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Mar 04 13:00:20 2025 -0800"
  },
  "message": "[analyzer] Fix dead code reporting in property access and is/as.\n\nThe way dead code detection works in the analyzer is that at various\nad hoc times during the process of resolution (typically before\nvisiting an expression or statement), the `ResolverVisitor` calls\n`checkUnreachableNode`, which asks flow analysis whether the current\npoint in execution is reachable, and if it isn\u0027t, arranges for an\nunreachable code warning to be produced.\n\nThis wasn\u0027t working for property extractions, type casts, and type\ntests because there\u0027s no subexpression whose execution follows the\nsubexpression that returns `Never`, so `checkUnreachableNode` wasn\u0027t\ngetting called.\n\nThe fix is simple; just add some calls to `checkUnreachableNode` to\ncover the RHS of a property access, type cast, or type test.\n\nNote that property accesses in the analyzer can be represented either\nas `PrefixedIdentifier` or `PropertyAccess`, so the property access\nfix had to be done in two places (and accordingly there are two tests\nfor it).\n\nFixes https://github.com/dart-lang/sdk/issues/60247.\n\nBug: https://github.com/dart-lang/sdk/issues/60247\nChange-Id: I49e739784f629b77443ce6d31e67809f48de75be\nReviewed-on: https://dart-review.googlesource.com/c/sdk/+/413521\nReviewed-by: Konstantin Shcheglov \u003cscheglov@google.com\u003e\nCommit-Queue: Paul Berry \u003cpaulberry@google.com\u003e\nAuto-Submit: Paul Berry \u003cpaulberry@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "74f755193de381a0b96afeb71e0de999502ec842",
      "old_mode": 33188,
      "old_path": "pkg/analyzer/lib/src/dart/resolver/prefixed_identifier_resolver.dart",
      "new_id": "bbd817edd04b0529131fef51a6e476e85e14ed89",
      "new_mode": 33188,
      "new_path": "pkg/analyzer/lib/src/dart/resolver/prefixed_identifier_resolver.dart"
    },
    {
      "type": "modify",
      "old_id": "5c32ff89e060c815bbde68a9dab534702e106bc9",
      "old_mode": 33188,
      "old_path": "pkg/analyzer/lib/src/generated/resolver.dart",
      "new_id": "ccd913b012974ecf8b2417c8c093435742f265d9",
      "new_mode": 33188,
      "new_path": "pkg/analyzer/lib/src/generated/resolver.dart"
    },
    {
      "type": "modify",
      "old_id": "bc166ffa214b8269daa2935aa172e6ccba1d3b84",
      "old_mode": 33188,
      "old_path": "pkg/analyzer/test/src/dart/resolution/extension_method_test.dart",
      "new_id": "3f38ebc218ea47d777c01c41e2628ee7700ddb8a",
      "new_mode": 33188,
      "new_path": "pkg/analyzer/test/src/dart/resolution/extension_method_test.dart"
    },
    {
      "type": "modify",
      "old_id": "facc4056fde74c6e10862a19f404c24169cf4f7b",
      "old_mode": 33188,
      "old_path": "pkg/analyzer/test/src/diagnostics/dead_code_test.dart",
      "new_id": "88403644cd5ecb3ab598251b5adfc9dd09df0927",
      "new_mode": 33188,
      "new_path": "pkg/analyzer/test/src/diagnostics/dead_code_test.dart"
    },
    {
      "type": "modify",
      "old_id": "96440eba64e0ff40f4d14482d3f0bfadd7816aa3",
      "old_mode": 33188,
      "old_path": "pkg/analyzer/test/src/diagnostics/receiver_of_type_never_test.dart",
      "new_id": "8f95f61996bdb9fe10cff0b7de13d0f26042a9df",
      "new_mode": 33188,
      "new_path": "pkg/analyzer/test/src/diagnostics/receiver_of_type_never_test.dart"
    }
  ]
}
