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/switch6.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/switch6.go')
-rw-r--r-- | test/switch6.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/switch6.go b/test/switch6.go index 9d102fef51..4f95d02615 100644 --- a/test/switch6.go +++ b/test/switch6.go @@ -15,7 +15,7 @@ package main // Verify that type switch statements with impossible cases are detected by the compiler. func f0(e error) { switch e.(type) { - case int: // ERROR "impossible type switch case: e \(type error\) cannot have dynamic type int \(missing Error method\)" + case int: // ERROR "impossible type switch case: e \(type error\) cannot have dynamic type int \(missing Error method\)|impossible type assertion" } } @@ -23,11 +23,11 @@ func f0(e error) { func f1(e interface{}) { switch e { default: - default: // ERROR "multiple defaults in switch" + default: // ERROR "multiple defaults( in switch)?" } switch e.(type) { default: - default: // ERROR "multiple defaults in switch" + default: // ERROR "multiple defaults( in switch)?" } } @@ -41,6 +41,6 @@ func (*X) Foo() {} func f2() { var i I switch i.(type) { - case X: // ERROR "impossible type switch case: i \(type I\) cannot have dynamic type X \(Foo method has pointer receiver\)" + case X: // ERROR "impossible type switch case: i \(type I\) cannot have dynamic type X \(Foo method has pointer receiver\)|impossible type assertion" } } |