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

Typo in spec document #53580

Closed
bswartz opened this issue Jun 27, 2022 · 2 comments
Closed

Typo in spec document #53580

bswartz opened this issue Jun 27, 2022 · 2 comments
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge

Comments

@bswartz
Copy link

bswartz commented Jun 27, 2022

Regarding this line:

string(65.0) // illegal: 65.0 is not an integer constant

It says:
string(65.0) // illegal: 65.0 is not an integer constant

It should say "string" instead of of "integer" constant. Hopefully this didn't confuse anyone, as the meaning is quite obvious, but still it's worth fixing.

@gopherbot gopherbot added the Documentation Issues describing a change to documentation. label Jun 27, 2022
@ianlancetaylor
Copy link
Member

Actually, this is correct. Go permits string(c) where c is an integer constant. It does not permit string(f) where f is a floating point constant.

string(c) returns a string containing the UTF-8 representation of the rune whose value is c.

@ianlancetaylor ianlancetaylor closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2022
@bswartz
Copy link
Author

bswartz commented Jun 28, 2022 via email

@golang golang locked and limited conversation to collaborators Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants