Skip to content

cmd/compile: error message when using promoted field should specify version requirement #79832

Closed

Description

@griesemer

The following code should mention that the specific feature requires 1.27:

// -lang=go1.26
package main

type Foo struct {
	Bar
}

type Bar struct {
	Baz int
}

func main() {
	f := Foo{Baz: 1}
	_ = f
}

Activity

  1. added this to the Go1.27 milestone on Jun 4, 2026
  2. self-assigned this
    on Jun 4, 2026
  3. added
    BadErrorMessageIssues related compiler error messages that should be better.
    on Jun 4, 2026
  4. added
    BugReportIssues describing a possible bug in the Go implementation.
    on Jun 4, 2026
  5. gopherbot commented on Jun 4, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/787041 mentions this issue: cmd/compile: better error message when using promoted field with version < 1.27

  6. added
    FixPendingIssues that have a fix which has not yet been reviewed or submitted.
    on Jun 4, 2026
  7. added a commit that references this issue on Jun 4, 2026
    c0cd914
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BadErrorMessageIssues related compiler error messages that should be better.BugReportIssues describing a possible bug in the Go implementation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions