diff options
author | Robert Griesemer <gri@golang.org> | 2020-12-09 20:14:07 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2020-12-14 21:28:48 +0000 |
commit | 5aca6e78570c4a4826e500613b1bc054bc95142a (patch) | |
tree | fa1a4c7a687cd97cf4006002646b216315d10918 /test/convlit.go | |
parent | df58f3368e62fbc290b419f0b33b97a984b9ca19 (diff) | |
download | go-5aca6e78570c4a4826e500613b1bc054bc95142a.tar.gz go-5aca6e78570c4a4826e500613b1bc054bc95142a.zip |
[dev.typeparams] test: finish triaging all outstanding failing tests
Also: Adjusted error patterns for passing test that have different
error messages.
Change-Id: I216294b4c4855aa93da22cdc3c0b3303e54a8420
Reviewed-on: https://go-review.googlesource.com/c/go/+/277994
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'test/convlit.go')
-rw-r--r-- | test/convlit.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/convlit.go b/test/convlit.go index 1c66c89e88..9d2eee79c5 100644 --- a/test/convlit.go +++ b/test/convlit.go @@ -17,8 +17,8 @@ var x2 string = string(1) var x3 = int(1.5) // ERROR "convert|truncate" var x4 int = int(1.5) // ERROR "convert|truncate" var x5 = "a" + string(1) -var x6 = int(1e100) // ERROR "overflow" -var x7 = float32(1e1000) // ERROR "overflow" +var x6 = int(1e100) // ERROR "overflow|cannot convert" +var x7 = float32(1e1000) // ERROR "overflow|cannot convert" // unsafe.Pointer can only convert to/from uintptr var _ = string(unsafe.Pointer(uintptr(65))) // ERROR "convert|conversion" @@ -34,7 +34,7 @@ var bad4 = "a" + 1 // ERROR "literals|incompatible|convert|invalid" var bad5 = "a" + 'a' // ERROR "literals|incompatible|convert|invalid" var bad6 int = 1.5 // ERROR "convert|truncate" -var bad7 int = 1e100 // ERROR "overflow" +var bad7 int = 1e100 // ERROR "overflow|truncated to int" var bad8 float32 = 1e200 // ERROR "overflow" // but these implicit conversions are okay @@ -48,8 +48,8 @@ var _ = []rune("abc") var _ = []byte("abc") // implicit is not -var _ []int = "abc" // ERROR "cannot use|incompatible|invalid" -var _ []byte = "abc" // ERROR "cannot use|incompatible|invalid" +var _ []int = "abc" // ERROR "cannot use|incompatible|invalid|cannot convert" +var _ []byte = "abc" // ERROR "cannot use|incompatible|invalid|cannot convert" // named string is okay type Tstring string @@ -70,5 +70,5 @@ var _ = Trune("abc") // ok var _ = Tbyte("abc") // ok // implicit is still not -var _ Trune = "abc" // ERROR "cannot use|incompatible|invalid" -var _ Tbyte = "abc" // ERROR "cannot use|incompatible|invalid" +var _ Trune = "abc" // ERROR "cannot use|incompatible|invalid|cannot convert" +var _ Tbyte = "abc" // ERROR "cannot use|incompatible|invalid|cannot convert" |