Skip to content

incorrect error message about receiver for correct program #1043

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

Closed
griesemer opened this issue Aug 23, 2010 · 1 comment
Closed

incorrect error message about receiver for correct program #1043

griesemer opened this issue Aug 23, 2010 · 1 comment

Comments

@griesemer
Copy link
Contributor

What steps will reproduce the problem?
1. 6g test.go

for test.go:

package main

type (
    T0 struct{}
    T1 (T0)  // error message disappears if the parens are removed
)

func (p *T0) m() {}

What is the expected output? What do you see instead?

Expected output: compilation w/o errors. T0 is parenthesized but for a completely
unrelated declaration.

Output:

6g test5.go
test.go:8: cannot parenthesize receiver type
@rsc
Copy link
Contributor

rsc commented Aug 23, 2010

Comment 1:

Will try to get to this later today.  Easy bug.

Status changed to Duplicate.

Merged into issue #1022.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants