mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
build: add all-qemu.bash, handful of arm fixes
R=r CC=golang-dev https://golang.org/cl/4313051
This commit is contained in:
parent
dacd1cad77
commit
6b3357129a
11 changed files with 134 additions and 11 deletions
|
|
@ -6,12 +6,14 @@
|
|||
|
||||
package main
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
import "os"
|
||||
|
||||
// Issue 481: closures and var declarations
|
||||
// with multiple variables assigned from one
|
||||
// function call.
|
||||
|
||||
func main() {
|
||||
var listen, _ = net.Listen("tcp", "127.0.0.1:0")
|
||||
var listen, _ = Listen("tcp", "127.0.0.1:0")
|
||||
|
||||
go func() {
|
||||
for {
|
||||
|
|
@ -20,6 +22,31 @@ func main() {
|
|||
}
|
||||
}()
|
||||
|
||||
var conn, _ = net.Dial("tcp", "", listen.Addr().String())
|
||||
var conn, _ = Dial("tcp", "", listen.Addr().String())
|
||||
_ = conn
|
||||
}
|
||||
|
||||
// Simulated net interface to exercise bug
|
||||
// without involving a real network.
|
||||
type T chan int
|
||||
|
||||
var global T
|
||||
|
||||
func Listen(x, y string) (T, string) {
|
||||
global = make(chan int)
|
||||
return global, y
|
||||
}
|
||||
|
||||
func (t T) Addr() os.Error {
|
||||
return os.ErrorString("stringer")
|
||||
}
|
||||
|
||||
func (t T) Accept() (int, string) {
|
||||
return <-t, ""
|
||||
}
|
||||
|
||||
func Dial(x, y, z string) (int, string) {
|
||||
global <- 1
|
||||
return 0, ""
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue