Skip to content

cmd/compile: avoid multiple errors on the same line (reminder issue) #29107

@griesemer

Description

@griesemer

This is a follow-up on #28450 which improved an error message but reports multiple errors on the same line for the added test case below ( https://go-review.googlesource.com/c/go/+/152417 ):

package p

func f(a, b, c, d ...int)       {} // ERROR "non-final parameter a" "non-final parameter b" "non-final parameter c"
func g(a ...int, b ...int)      {} // ERROR "non-final parameter a"
func h(...int, ...int, float32) {} // ERROR "non-final parameter"

type a func(...float32, ...interface{}) // ERROR "non-final parameter"
type b interface {
	f(...int, ...int)                // ERROR "non-final parameter"
	g(a ...int, b ...int, c float32) // ERROR "non-final parameter a" "non-final parameter b"
	valid(...int)
}

Investigate if there's something off in gc/subr.go (error handling).

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions