Skip to content

cmd/vet, x/tools/internal/versions: fix interpretation of empty language version #66007

Closed
@timothy-king

Description

@timothy-king

x/tools/internal/versions currently interprets invalid/unknown language versions ("") as some unknown earliest version. go/types interprets an unknown language version as "an empty string disables Go language version checks" and treats this as if all language features are allowed. This is closer to treating this as if it is some unknown future version. x/tools should be consistent with go/types.

Users of internal/versions x/tools/go/analysis/passes/loopclosure and x/tools/go/ssa need to update their interpretation.

Related #65612.

Metadata

Metadata

Assignees

Labels

AnalysisIssues related to static analysis (vet, x/tools/go/analysis)FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions