You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are no blank lines between the start of a file and a comment containing build
constraints those build constraints are ignored.
What steps will reproduce the problem?
Make two files, foo.go (no blank line before the build constraint):
// +build ignore
package main
func main() {
println("Hi!")
}
and bar.go:
package main
func main() {
println("Hi!")
}
then run "go build ." in that directory.
This fails because of duplicate definition of main(). If a blank line is inserted
before the build constraint in foo.go the compilation succeeds as expected (inserting
another line of comments is not sufficient).
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
darwin, linux
Which version are you using? (run 'go version')
go1
hg id: 817fde92780a
The text was updated successfully, but these errors were encountered:
by runningwild:
The text was updated successfully, but these errors were encountered: