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

go/type: parenthesized receiver types are ignored (esoteric) #23130

Closed
griesemer opened this issue Dec 14, 2017 · 2 comments
Closed

go/type: parenthesized receiver types are ignored (esoteric) #23130

griesemer opened this issue Dec 14, 2017 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@griesemer
Copy link
Contributor

griesemer commented Dec 14, 2017

For

// +build ignore

package p

type T struct{}

func ((*T)) m()
func (*(T)) n()

var _ = (*T).m
var _ = (*T).n

go/types complains with

x.go:10:9: invalid operation: (*T) (type) has no field or method m
x.go:11:9: invalid operation: (*T) (type) has no field or method n

but per the spec, parentheses are ok around receiver types. Also, cmd/compile accepts this.

Trivial to fix, but esoteric, and probably has been like this from the beginning.

@griesemer griesemer self-assigned this Dec 14, 2017
@griesemer griesemer added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 14, 2017
@griesemer griesemer added this to the Go1.11 milestone Dec 14, 2017
@griesemer griesemer added the early-in-cycle A change that should be done early in the 3 month dev cycle. label Dec 14, 2017
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/83918 mentions this issue: go/types: collect methods with parenthesized receiver types

@griesemer
Copy link
Contributor Author

Fix is trivial; unproblematic for 1.10.

@griesemer griesemer removed the early-in-cycle A change that should be done early in the 3 month dev cycle. label Dec 14, 2017
@griesemer griesemer modified the milestones: Go1.11, Go1.10 Dec 14, 2017
@golang golang locked and limited conversation to collaborators Dec 14, 2018
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