Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types2: method expressions in error messages may have mixed named/unnamed parameters #46583

Closed
griesemer opened this issue Jun 5, 2021 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@griesemer
Copy link
Contributor

Type-checking

package p

type T struct{}

func (t T) m(int) {}

var f func(x T)

func _() {
	f = T.m
}

reports

cannot use T.m (value of type func(t T, int)) as func(x T) value in assignment

where the 1st function type uses a named and an unnamed parameter.

This has already been addressed in go/types with CL 324733.

@griesemer griesemer added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 5, 2021
@griesemer griesemer added this to the Go1.18 milestone Jun 5, 2021
@griesemer griesemer self-assigned this Jun 5, 2021
@gopherbot
Copy link

Change https://golang.org/cl/325369 mentions this issue: [dev.typeparams] cmd/compile/internal/types2: provide valid signature in errors involving method expressions

gopherbot pushed a commit that referenced this issue Jun 8, 2021
… in errors involving method expressions

This is an adjusted port of a similar fix in https://golang.org/cl/324733.

Fixes #46583.

Change-Id: Ica1410e4de561e64e58b753e3da04b32156cbaf6
Reviewed-on: https://go-review.googlesource.com/c/go/+/325369
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
@griesemer
Copy link
Contributor Author

This was fixed with https://golang.org/cl/325369.

@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants