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

text/template: cannot find pointer method on addressable nil pointer #18816

Closed
rsc opened this issue Jan 27, 2017 · 1 comment
Closed

text/template: cannot find pointer method on addressable nil pointer #18816

rsc opened this issue Jan 27, 2017 · 1 comment
Assignees
Milestone

Comments

@rsc
Copy link
Contributor

@rsc rsc commented Jan 27, 2017

If you read a *T out of a []*T and it is nil, the template package cannot invoke pointer methods using it, because the template package takes its address, producing a **T with no methods. (For a non-nil *T, it's been indirected to T, so taking the address restores the *T. But if you have a nil *T, it can't be indirected, so the extra address-of hurts.)

Fix pending.

@rsc rsc added this to the Go1.9 milestone Jan 27, 2017
@rsc rsc self-assigned this Jan 27, 2017
@gopherbot
Copy link

@gopherbot gopherbot commented Feb 7, 2017

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

@gopherbot gopherbot closed this in 06637fb Feb 9, 2017
@golang golang locked and limited conversation to collaborators Feb 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.