)]}'
{
  "commit": "ddb5a42b25c63df9f11669bd4b14eeebcd2ba2bb",
  "tree": "8d062a49da018d9864823dd33a463ed35c1c727b",
  "parents": [
    "c0766d2cd0453b33da74407bcb0d32bbc5392c9b"
  ],
  "author": {
    "name": "Robert Griesemer",
    "email": "gri@golang.org",
    "time": "Wed Sep 22 21:57:19 2021 -0700"
  },
  "committer": {
    "name": "Robert Griesemer",
    "email": "gri@golang.org",
    "time": "Thu Sep 23 19:41:45 2021 +0000"
  },
  "message": "cmd/compile/internal/types2: avoid \"declared but not used\" errors for invalid code\n\nAgressively mark all LHS variables in assignments as used if there\nis any error in the (entire) assignment. This reduces the number of\nspurious \"declared but not used\" errors in programs that are invalid\nin the first place. This behavior is closer to the behavior of the\ncompiler\u0027s original type checker (types1) and lets us remove lines\nof the form \"_ \u003d variable\" just to satisfy test cases. It also makes\nmore important errors visible by not crowding them out.\n\nRemove the Checker.useLHS function and use Checker.use instead:\nuseLHS didn\u0027t evaluate top-level variables, but we actually want\nthem to be evaluated in an error scenario so that they are getting\nused (and thus we don\u0027t get the \"declared but not used\" error).\n\nFixes #42937.\n\nChange-Id: Idda460f6b81c66735bf9fd597c54188949bf12b8\nReviewed-on: https://go-review.googlesource.com/c/go/+/351730\nTrust: Robert Griesemer \u003cgri@golang.org\u003e\nRun-TryBot: Robert Griesemer \u003cgri@golang.org\u003e\nTryBot-Result: Go Bot \u003cgobot@golang.org\u003e\nReviewed-by: Robert Findley \u003crfindley@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a1847b21ca98bc1f6b0af00cd692ebe38d18810f",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/types2/assignments.go",
      "new_id": "bfc55786830cb88dad7d2927820c10b0841802e9",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/types2/assignments.go"
    },
    {
      "type": "modify",
      "old_id": "aaef97f58a33baaf525c7ccf3c8033e6bee4e12c",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/types2/call.go",
      "new_id": "99afecaf197eecde8490b5b407b5862207d4a560",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/types2/call.go"
    },
    {
      "type": "modify",
      "old_id": "e138c58123034649064f1376530c7e92055aa09a",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/types2/stmt.go",
      "new_id": "f3f345fd2f0c0c5f0c8874b73481be80927150bb",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/types2/stmt.go"
    },
    {
      "type": "modify",
      "old_id": "24c2dff9339a689b749f5ac79046a53d7880db68",
      "old_mode": 33188,
      "old_path": "test/fixedbugs/bug062.go",
      "new_id": "1008f1af9ceca8b1d28c58537eef5519636e9d92",
      "new_mode": 33188,
      "new_path": "test/fixedbugs/bug062.go"
    },
    {
      "type": "modify",
      "old_id": "2c9d120ed069bf7b4a74984a999123ab641ebc3b",
      "old_mode": 33188,
      "old_path": "test/fixedbugs/bug131.go",
      "new_id": "de606da1679d979ca4001f395b2aea552361ca91",
      "new_mode": 33188,
      "new_path": "test/fixedbugs/bug131.go"
    },
    {
      "type": "modify",
      "old_id": "88210a59b3e520c780f47cd0a1738b31f57684f0",
      "old_mode": 33188,
      "old_path": "test/fixedbugs/bug175.go",
      "new_id": "caf3168536e2a8ce3e978a280e51cded7563dcff",
      "new_mode": 33188,
      "new_path": "test/fixedbugs/bug175.go"
    },
    {
      "type": "modify",
      "old_id": "fea6829992f57ac699f7fe08f934dfec767b7a38",
      "old_mode": 33188,
      "old_path": "test/fixedbugs/bug289.go",
      "new_id": "7e8346ee0f631bd8bc1383b2f5ffcdf7a1556f3f",
      "new_mode": 33188,
      "new_path": "test/fixedbugs/bug289.go"
    },
    {
      "type": "modify",
      "old_id": "f5c5296a2bf7c60dd05f8cdc6ebeb302e2c72195",
      "old_mode": 33188,
      "old_path": "test/fixedbugs/issue9083.go",
      "new_id": "ea53e7a69ae0b2c7c77a0e6cbb2942236bf3f61e",
      "new_mode": 33188,
      "new_path": "test/fixedbugs/issue9083.go"
    },
    {
      "type": "modify",
      "old_id": "c21e4da390ab0fd92df3288c2d2d64fe994eb649",
      "old_mode": 33188,
      "old_path": "test/interface/pointer.go",
      "new_id": "a71b3f4bf89ddd2f048ec4913ea1cb91e0faebcb",
      "new_mode": 33188,
      "new_path": "test/interface/pointer.go"
    }
  ]
}
