diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
commit | 2fd401c8f190f1fe43e51a7f726f6ed6119a1f96 (patch) | |
tree | 7f76eff391f37fe6467ff4ffbc0c582c9959ea30 /gcc | |
parent | 02e9018f1616b23f1276151797216717b3564202 (diff) | |
download | gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.zip gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.gz gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.bz2 |
libgo: Update to weekly.2011-11-02.
From-SVN: r181964
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/go.test/test/chan/goroutines.go | 2 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/env.go | 4 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/bug107.go | 2 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/bug243.go | 8 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/bug262.go | 7 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/bug326.go | 20 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/bug331.go | 14 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/bug354.go | 8 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/func2.go | 3 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/import.go | 7 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/recover2.go | 7 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/recover3.go | 2 |
12 files changed, 36 insertions, 48 deletions
diff --git a/gcc/testsuite/go.test/test/chan/goroutines.go b/gcc/testsuite/go.test/test/chan/goroutines.go index d8f8803..371a173 100644 --- a/gcc/testsuite/go.test/test/chan/goroutines.go +++ b/gcc/testsuite/go.test/test/chan/goroutines.go @@ -21,7 +21,7 @@ func f(left, right chan int) { func main() { var n = 10000 if len(os.Args) > 1 { - var err os.Error + var err error n, err = strconv.Atoi(os.Args[1]) if err != nil { print("bad arg\n") diff --git a/gcc/testsuite/go.test/test/env.go b/gcc/testsuite/go.test/test/env.go index 28113bc..a4b9d05 100644 --- a/gcc/testsuite/go.test/test/env.go +++ b/gcc/testsuite/go.test/test/env.go @@ -14,7 +14,7 @@ import ( func main() { ga, e0 := os.Getenverror("GOARCH") if e0 != nil { - print("$GOARCH: ", e0.String(), "\n") + print("$GOARCH: ", e0.Error(), "\n") os.Exit(1) } if ga != runtime.GOARCH { @@ -23,7 +23,7 @@ func main() { } xxx, e1 := os.Getenverror("DOES_NOT_EXIST") if e1 != os.ENOENV { - print("$DOES_NOT_EXIST=", xxx, "; err = ", e1.String(), "\n") + print("$DOES_NOT_EXIST=", xxx, "; err = ", e1.Error(), "\n") os.Exit(1) } } diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug107.go b/gcc/testsuite/go.test/test/fixedbugs/bug107.go index d0b062a..0554bbc 100644 --- a/gcc/testsuite/go.test/test/fixedbugs/bug107.go +++ b/gcc/testsuite/go.test/test/fixedbugs/bug107.go @@ -6,7 +6,7 @@ package main import os "os" -type _ os.Error +type _ os.FileInfo func f() (os int) { // In the next line "os" should refer to the result variable, not // to the package. diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug243.go b/gcc/testsuite/go.test/test/fixedbugs/bug243.go index 95514cf..e3ddf0e 100644 --- a/gcc/testsuite/go.test/test/fixedbugs/bug243.go +++ b/gcc/testsuite/go.test/test/fixedbugs/bug243.go @@ -6,7 +6,7 @@ package main -import "os" +import "errors" // Issue 481: closures and var declarations // with multiple variables assigned from one @@ -22,7 +22,7 @@ func main() { } }() - var conn, _ = Dial("tcp", "", listen.Addr().String()) + var conn, _ = Dial("tcp", "", listen.Addr().Error()) _ = conn } @@ -37,8 +37,8 @@ func Listen(x, y string) (T, string) { return global, y } -func (t T) Addr() os.Error { - return os.NewError("stringer") +func (t T) Addr() error { + return errors.New("stringer") } func (t T) Accept() (int, string) { diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug262.go b/gcc/testsuite/go.test/test/fixedbugs/bug262.go index 66f580b..f5f2c35 100644 --- a/gcc/testsuite/go.test/test/fixedbugs/bug262.go +++ b/gcc/testsuite/go.test/test/fixedbugs/bug262.go @@ -18,9 +18,9 @@ func f() string { return "abc" } -func g() *os.Error { +func g() *error { trace += "g" - var x os.Error + var x error return &x } @@ -35,7 +35,6 @@ func i() *int { return &i } - func main() { m := make(map[string]int) m[f()], *g() = strconv.Atoi(h()) @@ -43,7 +42,7 @@ func main() { println("BUG", m["abc"], trace) panic("fail") } - mm := make(map[string]os.Error) + mm := make(map[string]error) trace = "" mm["abc"] = os.EINVAL *i(), mm[f()] = strconv.Atoi(h()) diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug326.go b/gcc/testsuite/go.test/test/fixedbugs/bug326.go index efdd0ef..7e123e3 100644 --- a/gcc/testsuite/go.test/test/fixedbugs/bug326.go +++ b/gcc/testsuite/go.test/test/fixedbugs/bug326.go @@ -6,36 +6,34 @@ package p -import "os" - -func f() (_ int, err os.Error) { +func f() (_ int, err error) { return } -func g() (x int, _ os.Error) { +func g() (x int, _ error) { return } -func h() (_ int, _ os.Error) { +func h() (_ int, _ error) { return } -func i() (int, os.Error) { - return // ERROR "not enough arguments to return" +func i() (int, error) { + return // ERROR "not enough arguments to return" } -func f1() (_ int, err os.Error) { +func f1() (_ int, err error) { return 1, nil } -func g1() (x int, _ os.Error) { +func g1() (x int, _ error) { return 1, nil } -func h1() (_ int, _ os.Error) { +func h1() (_ int, _ error) { return 1, nil } -func ii() (int, os.Error) { +func ii() (int, error) { return 1, nil } diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug331.go b/gcc/testsuite/go.test/test/fixedbugs/bug331.go index 28aee1d..6c5acd1 100644 --- a/gcc/testsuite/go.test/test/fixedbugs/bug331.go +++ b/gcc/testsuite/go.test/test/fixedbugs/bug331.go @@ -6,22 +6,22 @@ package main -import "os" +import "io" -func f() (_ string, x float64, err os.Error) { +func f() (_ string, x float64, err error) { return } -func g() (_ string, x float64, err os.Error) { - return "hello", 3.14, os.EOF +func g() (_ string, x float64, err error) { + return "hello", 3.14, io.EOF } -var _ func() (string, float64, os.Error) = f -var _ func() (string, float64, os.Error) = g +var _ func() (string, float64, error) = f +var _ func() (string, float64, error) = g func main() { x, y, z := g() - if x != "hello" || y != 3.14 || z != os.EOF { + if x != "hello" || y != 3.14 || z != io.EOF { println("wrong", x, len(x), y, z) } } diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug354.go b/gcc/testsuite/go.test/test/fixedbugs/bug354.go index 1f6a6dc..a95256e 100644 --- a/gcc/testsuite/go.test/test/fixedbugs/bug354.go +++ b/gcc/testsuite/go.test/test/fixedbugs/bug354.go @@ -9,12 +9,8 @@ package main -import ( - "os" -) - type Inner struct { - F func() os.Error + F func() error } type Outer struct { @@ -23,4 +19,4 @@ type Outer struct { // calls makeclosure twice on same closure -var Foo = Outer{[]Inner{Inner{func() os.Error{ return nil }}}} +var Foo = Outer{[]Inner{Inner{func() error { return nil }}}} diff --git a/gcc/testsuite/go.test/test/func2.go b/gcc/testsuite/go.test/test/func2.go index 5a6d7d0..87e7819 100644 --- a/gcc/testsuite/go.test/test/func2.go +++ b/gcc/testsuite/go.test/test/func2.go @@ -5,7 +5,6 @@ // license that can be found in the LICENSE file. package main -import os "os" type t1 int type t2 int @@ -23,7 +22,7 @@ func f8(os int) int func f9(os int) int { return os } -func f10(err os.Error) os.Error { +func f10(err error) error { return err } func f11(t1 string) string { diff --git a/gcc/testsuite/go.test/test/import.go b/gcc/testsuite/go.test/test/import.go index 9633034..bd83dc3 100644 --- a/gcc/testsuite/go.test/test/import.go +++ b/gcc/testsuite/go.test/test/import.go @@ -13,13 +13,12 @@ import _os_ "os" import "os" import . "os" -func f(e os.Error) +func f(e *os.File) func main() { - var _e_ _os_.Error - var dot Error + var _e_ *_os_.File + var dot *File f(_e_) f(dot) } - diff --git a/gcc/testsuite/go.test/test/recover2.go b/gcc/testsuite/go.test/test/recover2.go index 9affe25..ccaf8ce 100644 --- a/gcc/testsuite/go.test/test/recover2.go +++ b/gcc/testsuite/go.test/test/recover2.go @@ -11,10 +11,7 @@ package main -import ( - "os" - "strings" -) +import "strings" var x = make([]byte, 10) @@ -33,7 +30,7 @@ func mustRecover(s string) { if v == nil { panic("expected panic") } - if e := v.(os.Error).String(); strings.Index(e, s) < 0 { + if e := v.(error).Error(); strings.Index(e, s) < 0 { panic("want: " + s + "; have: " + e) } } diff --git a/gcc/testsuite/go.test/test/recover3.go b/gcc/testsuite/go.test/test/recover3.go index 2aa1df6..60ade9b 100644 --- a/gcc/testsuite/go.test/test/recover3.go +++ b/gcc/testsuite/go.test/test/recover3.go @@ -35,7 +35,7 @@ func check(name string, f func(), err string) { println(name, "panicked but not with runtime.Error") return } - s := runt.String() + s := runt.Error() if strings.Index(s, err) < 0 { bug() println(name, "panicked with", s, "not", err) |