aboutsummaryrefslogtreecommitdiff
path: root/test/convlit.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-10-25 22:20:02 -0700
committerRuss Cox <rsc@golang.org>2011-10-25 22:20:02 -0700
commitdb33959797ad8ef1e86725db62aafb40297ea725 (patch)
tree83205f46a52d3ebc4a22cc151968d958b8524b28 /test/convlit.go
parent6ed3fa6553d84391157eae963eeee5f20b6dca74 (diff)
downloadgo-db33959797ad8ef1e86725db62aafb40297ea725.tar.gz
go-db33959797ad8ef1e86725db62aafb40297ea725.zip
cgo, goyacc, go/build, html, http, path, path/filepath, testing/quick, test: use rune
Nothing terribly interesting here. R=golang-dev, bradfitz, gri, r CC=golang-dev https://golang.org/cl/5300043
Diffstat (limited to 'test/convlit.go')
-rw-r--r--test/convlit.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/convlit.go b/test/convlit.go
index 90ac5490c8..2e3b15bda1 100644
--- a/test/convlit.go
+++ b/test/convlit.go
@@ -36,7 +36,7 @@ var good3 int = 1e9
var good4 float64 = 1e20
// explicit conversion of string is okay
-var _ = []int("abc")
+var _ = []rune("abc")
var _ = []byte("abc")
// implicit is not
@@ -47,20 +47,20 @@ var _ []byte = "abc" // ERROR "cannot use|incompatible|invalid"
type Tstring string
var ss Tstring = "abc"
-var _ = []int(ss)
+var _ = []rune(ss)
var _ = []byte(ss)
// implicit is still not
-var _ []int = ss // ERROR "cannot use|incompatible|invalid"
+var _ []rune = ss // ERROR "cannot use|incompatible|invalid"
var _ []byte = ss // ERROR "cannot use|incompatible|invalid"
// named slice is not
-type Tint []int
+type Trune []rune
type Tbyte []byte
-var _ = Tint("abc") // ERROR "convert|incompatible|invalid"
+var _ = Trune("abc") // ERROR "convert|incompatible|invalid"
var _ = Tbyte("abc") // ERROR "convert|incompatible|invalid"
// implicit is still not
-var _ Tint = "abc" // ERROR "cannot use|incompatible|invalid"
+var _ Trune = "abc" // ERROR "cannot use|incompatible|invalid"
var _ Tbyte = "abc" // ERROR "cannot use|incompatible|invalid"