The Inline variable "v" quick fix should not be offered on an l-value reference to a variable v:

v := 1
‸v = 2  // The "inline variable" quick fix here replaces v with 1, which is invalid

Comment From: IlyasYOY

Hello @adonovan! đź‘‹

I’ve landed a fix for the inline‑variable problem on l‑value references.

What changed

  • Added a new marker that allows us to detect when the quick‑fix is being offered on an l‑value.
  • Updated the implementation so the “Inline variable v” action is no longer suggested in that scenario.

Test results

The new test now fails with the previous implementation:

=== CONT  Test/codeaction/inline-lhs-var.txt
internal/test/marker/marker_test.go:2149 c/c.go:7:14 (codeaction/inline-lhs-var.txt:14:14): there are code actions available: [Inline variable "v"]

Note on the test framework

The marker‑test framework is a real blessing – it’s straightforward to use and makes the intent of the test crystal clear.

Please let me know if anything looks off or if you’d like any further adjustments. Looking forward to your review! 🚀