Skip to content

Go safety_bypasses: a variable ending in an underscore (my_ = x, result_, err = f()) counts as a blank-identifier discard #9431

Backlog

Description

@squid-protocol

Found by the SOP-002 gap-cell decoy work (protocol SOP-002-v1, epic #8863), batch c (Req B).

go.py safety_bypasses arms _\s*,\s*err[ \t]*= and _[ \t]*=\s*<id>+ have no left boundary on the _, so the trailing underscore of an ordinary identifier is read as the blank identifier.

Snippets:

my_ = x
result_, err = f()

Expected: 0 (assignments to the variables my_ and result_; nothing is discarded). Actual: 1 each. Correct controls: _ = x -> 1, _, err = f() -> 1, a_ == b -> 0.

Activity

  1. added
    bug
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions