summaryrefslogtreecommitdiff
path: root/test/recover2.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/recover2.go')
-rw-r--r--test/recover2.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/recover2.go b/test/recover2.go
index 9affe25d4..b5db6f0d1 100644
--- a/test/recover2.go
+++ b/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)
}
}
@@ -63,6 +60,7 @@ func test4() {
type T struct {
a, b int
+ c []int
}
func test5() {