Skip to content

cmd/compile: go1.22+ cmd with go.mod 1.21 generates per-loop variable when using line directive [1.25 backport] #77298

@gopherbot

Description

@gopherbot

@xieyuschen requested issue #77248 to be considered for backport to the next 1.25 minor release.

@gopherbot please open backport issues.

The issue breaks the compatible behavior mentioned in loopvar docs. It's a corner case but I believe the use case(see background) is valid

Metadata

Metadata

Assignees

No one assigned

    Labels

    CherryPickCandidateUsed during the release process for point releasescompiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions