Skip to content

cmd/compile: error message should not mention -lang when //go:build set file version #63489

@rsc

Description

@rsc
% cat go.mod
go 1.21

module m
% cat x.go
//go:build go1.4

package p

const c = 0o123
% go build
# m
./x.go:5:11: 0o/0O-style octal literals requires go1.13 or later (-lang was set to go1.21; check go.mod)
% 

The parenthetical misleads. It should say something like "(file declares //go:build go1.4)" or just be removed unconditionally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions