]> Cypherpunks repositories - gostls13.git/commit
go/types: fix typo causing loss of embedded interfaces
authorAlan Donovan <adonovan@google.com>
Fri, 25 May 2018 19:58:37 +0000 (15:58 -0400)
committerRobert Griesemer <gri@golang.org>
Wed, 30 May 2018 18:13:35 +0000 (18:13 +0000)
commit0b8d9d425a66a3c7e1c76fe10cb9eab1acd316cc
tree44340c09f97dc8afd33e0e94cc00ca033ec246a1
parentd4e21288e444d3ffd30d1a0737f15ea3fc3b8ad9
go/types: fix typo causing loss of embedded interfaces

Simplified the code per prior suggestion to avoid that
kind of error in the first place.

Also: Fix subtle error in Interface.Complete where an
interface may have ended up incomplete if both the list
of methods and the list of embedded interfaces was nil.

Expanded existing test to cover all these cases.

Fixes golang/go#25577

Change-Id: If8723a8b0c4570f02b3dadfa390f96dd98ce11c8
Reviewed-on: https://go-review.googlesource.com/114504
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/type.go
src/go/types/typestring_test.go