diff options
author | Robert Griesemer <gri@golang.org> | 2020-12-14 11:53:55 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2020-12-14 12:13:36 -0800 |
commit | 91803a2df334ddfc9377ef4d07cc5f0eff51b6a2 (patch) | |
tree | 277500790211cdab0ee3f12e1833efa44495afbc /test/interface | |
parent | a20021227e987a24d3dbac5118a9dee4d90a96ff (diff) | |
parent | 89f38323faa57d3f7475016f778be69fcffbe9fb (diff) | |
download | go-91803a2df334ddfc9377ef4d07cc5f0eff51b6a2.tar.gz go-91803a2df334ddfc9377ef4d07cc5f0eff51b6a2.zip |
[dev.typeparams] merge: merge branch 'dev.regabi' into 'dev.typeparams'
The following files had merge conflicts and were merged manually:
src/cmd/compile/fmtmap_test.go
src/cmd/compile/internal/gc/noder.go
src/go/parser/error_test.go
test/assign.go
test/chan/perm.go
test/fixedbugs/issue22822.go
test/fixedbugs/issue4458.go
test/init.go
test/interface/explicit.go
test/map1.go
test/method2.go
The following files had manual changes to make tests pass:
test/run.go
test/used.go
src/cmd/compile/internal/types2/stdlib_test.go
Change-Id: Ia495aaaa80ce321ee4ec2a9105780fbe913dbd4c
Diffstat (limited to 'test/interface')
-rw-r--r-- | test/interface/explicit.go | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/test/interface/explicit.go b/test/interface/explicit.go index 7aaaad4e48..1b7af6712b 100644 --- a/test/interface/explicit.go +++ b/test/interface/explicit.go @@ -47,7 +47,7 @@ func main() { t = i // ERROR "incompatible|assignment$" i = i2 // ok - i2 = i // ERROR "incompatible|missing N method|cannot convert" + i2 = i // ERROR "incompatible|missing N method" i = I(i2) // ok i2 = I2(i) // ERROR "invalid|missing N method|cannot convert" @@ -57,7 +57,7 @@ func main() { // cannot type-assert non-interfaces f := 2.0 - _ = f.(int) // ERROR "non-interface type|not an interface type" + _ = f.(int) // ERROR "non-interface type|only valid for interface types|not an interface type" } @@ -100,10 +100,7 @@ type T2 struct{} func (t *T2) M() {} func (t *T2) _() {} -// Check that nothing satisfies an interface with blank methods. -// Disabled this test as it's not clear we need this behavior. -// See also issue #42964. -/* -var b1 B1 = &T2{} // "incompatible|missing _ method" -var b2 B2 = &T2{} // "incompatible|missing _ method" -*/
\ No newline at end of file +// Already reported about the invalid blank interface method above; +// no need to report about not implementing it. +var b1 B1 = &T2{} +var b2 B2 = &T2{} |