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

spec: Conversions_from_slice_to_array_pointer: second len(s) comment should be len(t) ? #47280

Closed
helloPiers opened this issue Jul 19, 2021 · 3 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@helloPiers
Copy link
Contributor

Copy/paste typo in this line:

t1 := (*[1]string)(t) // panics: len([1]string) > len(s)

This

t1 := (*[1]string)(t) // panics: len([1]string) > len(s)

Should be

t1 := (*[1]string)(t) // panics: len([1]string) > len(t)

helloPiers added a commit to helloPiers/go that referenced this issue Jul 19, 2021
Fix comment on second example for Conversions from slice to array pointer.
Fixes golang#47280
@gopherbot
Copy link

Change https://golang.org/cl/335470 mentions this issue: spec: correct example comment in Conversions from slice to array

@seankhliao seankhliao added Documentation NeedsFix The path to resolution is known, but the work has not been done. labels Jul 19, 2021
@thanm thanm added this to the Go1.17 milestone Jul 19, 2021
@thanm
Copy link
Contributor

thanm commented Jul 19, 2021

@josharian

@josharian
Copy link
Contributor

Thanks for catching this and for the speedy fix.

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

Successfully merging a pull request may close this issue.

5 participants