We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There is a redundant assignment statement, I think it is no meaning:
go/src/cmd/go/script_test.go
Line 52 in 4c7a18d
The text was updated successfully, but these errors were encountered:
It is not redundant, it makes a copy of the file for the parallel test below. See concurrency.
Sorry, something went wrong.
Note there is a long standing issue to detect the type of error that can happen if this copy was not made. #16520
I assume also the race detector may complain if the copy was not there.
Thanks, I have gained knowledge!
I write some code to test this issue:
package main import "fmt" func main() { a := []int{1,2,3} for x := range a { fmt.Println(x) fmt.Println(&x) x := x fmt.Println(&x) } }
test logs:
logs:
$ go run main.go 0 0xc00007e010 0xc00007e030 1 0xc00007e010 0xc00007e040 2 0xc00007e010 0xc00007e050
Successfully merging a pull request may close this issue.
There is a redundant assignment statement, I think it is no meaning:
go/src/cmd/go/script_test.go
Line 52 in 4c7a18d
The text was updated successfully, but these errors were encountered: