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

iota logic mismatch #39751

watson-2018 opened this issue Jun 22, 2020 · 1 comment

iota logic mismatch #39751

watson-2018 opened this issue Jun 22, 2020 · 1 comment


Copy link

@watson-2018 watson-2018 commented Jun 22, 2020

What version of Go are you using (go version)?

$ go version go1.13.10 linux/amd64

Does this issue reproduce with the latest release?


What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

type myConst int

const (
        zero myConst = iota
        three = iota + 1
        five = iota + 1

func testIota() {
        // 3 4 5 why not 3 4 6
        fmt.Println(three, foure, five)

What did you expect to see?

why output is 3 4 5 not 3 4 6

What did you see instead?

Copy link

@mvdan mvdan commented Jun 22, 2020

The Go project doesn't use the issue tracker for questions. See

@mvdan mvdan closed this Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.