)]}'
{
  "commit": "2ec3b513db9a0aaab4be4cd51d20b34929d9cd96",
  "tree": "09756559709675362bfd90888bcf16a85cd125cf",
  "parents": [
    "9e1997971e6abb3283567adb5480fbb0fb0cb040"
  ],
  "author": {
    "name": "Paul Berry",
    "email": "paulberry@google.com",
    "time": "Wed Apr 05 23:32:28 2023 +0000"
  },
  "committer": {
    "name": "Commit Queue",
    "email": "dart-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Apr 05 23:32:28 2023 +0000"
  },
  "message": "Patterns flow analysis: recognize trivially exhaustive switches.\n\nThis fixes a minor bug in flow analysis which was preventing it from\nrecognizing when a switch statement was trivially exhaustive, meaning\none of its reachable cases was guaranteed to always match.\n\nThis mostly addresses\nhttps://github.com/dart-lang/language/issues/2980, but flow analysis\nstill fails to recognize that:\n\n- A list pattern containing a just a single rest pattern always\n  matches (unless the rest pattern has a subpattern that may fail to\n  match).\n\n- A null check pattern always matches if its subpattern always matches\n  and the matched value type is non-nullable.\n\n- The relational pattern `!\u003d null` always matches if its subpattern\n  always matches and the matched value type is non-nullable.\n\nFortunately, these drawbacks are small and don\u0027t lead to unsoundness.\nI\u0027ll try to address them in follow up CLs.\n\nBug: https://github.com/dart-lang/language/issues/2980\nChange-Id: Ie9f8564cde66a5a2c41114033ca3ff0e1a0f139a\nReviewed-on: https://dart-review.googlesource.com/c/sdk/+/293860\nReviewed-by: Konstantin Shcheglov \u003cscheglov@google.com\u003e\nCommit-Queue: Paul Berry \u003cpaulberry@google.com\u003e\nReviewed-by: Johnni Winther \u003cjohnniwinther@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c2be3f9f812cf806dc705c8c06f3a2753b0f5702",
      "old_mode": 33188,
      "old_path": "pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart",
      "new_id": "1691a69ba4ba7bf33f2063c95f08c6c08676e95b",
      "new_mode": 33188,
      "new_path": "pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart"
    },
    {
      "type": "modify",
      "old_id": "e9cabd03e0220335d54fd82a76fc6c73ca0adad7",
      "old_mode": 33188,
      "old_path": "pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart",
      "new_id": "fa7f1bd1d3f7ff4b43ee9cd93dfa40dc8eb688af",
      "new_mode": 33188,
      "new_path": "pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart"
    },
    {
      "type": "modify",
      "old_id": "bfb2a59d5dfd252365c13058bd9dab12de7da55a",
      "old_mode": 33188,
      "old_path": "pkg/nnbd_migration/lib/src/edge_builder.dart",
      "new_id": "26d125601c59036f21dbd1df06fd186fe81976e6",
      "new_mode": 33188,
      "new_path": "pkg/nnbd_migration/lib/src/edge_builder.dart"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a0aa052630168e4dca47821bc143ad997023a331",
      "new_mode": 33188,
      "new_path": "tests/language/patterns/switch_trivial_exhaustiveness_error_test.dart"
    }
  ]
}
