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

cmd/compile: spurious 'cannot assign to x' error when the field is accessed #8440

Closed
btracey opened this issue Jul 29, 2014 · 2 comments
Closed
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@btracey
Copy link
Contributor

btracey commented Jul 29, 2014

There is apparently at least one case left over from the fix to issue #6406. In the
program 

package main

func main() {
    n.foo = 6
}

gc outputs:

prog.go:4: undefined: n
prog.go:4: cannot assign to n.foo
 [process exited with non-zero status]

http://play.golang.org/p/Fa6inkCvR- 

With n undefined there is no need for the second error.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added repo-main, release-none, suggested.

@btracey btracey added new Suggested Issues that may be good for new contributors looking for work to do. labels Aug 1, 2014
@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title cmd/gc: spurious 'cannot assign to x' error when the field is accessed cmd/compile: spurious 'cannot assign to x' error when the field is accessed Jun 8, 2015
@gopherbot
Copy link

CL https://golang.org/cl/36751 mentions this issue.

@golang golang locked and limited conversation to collaborators Feb 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

5 participants