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

False positive unused variable #1809

Closed
zolotov opened this issue Aug 18, 2015 · 2 comments
Closed

False positive unused variable #1809

zolotov opened this issue Aug 18, 2015 · 2 comments
Assignees
Milestone

Comments

@zolotov
Copy link
Contributor

zolotov commented Aug 18, 2015

It seems that variables is always used if it is passed to anonymous function

package main

func main() {
    var i int
    f(func() { i = 0; println("test") })
}

func f(m func()) {
    m()
}
@zolotov zolotov added this to the 1.0.0 milestone Aug 18, 2015
@ignatov
Copy link
Contributor

ignatov commented Aug 18, 2015

Danke Schön.

@zolotov
Copy link
Contributor Author

zolotov commented Aug 18, 2015

Danke Schön.

Looks like somebody's name

@ignatov ignatov closed this as completed in da47f75 Sep 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants