]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: improve error for wrong type in switch
authorEmmanuel Odeke <emm.odeke@gmail.com>
Sat, 14 Jan 2017 12:23:23 +0000 (05:23 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 2 Feb 2017 17:36:43 +0000 (17:36 +0000)
commit34b563f447280f9d386f208646ac4f94cafc4ab6
tree97434c6aa865f67c9979561b46d219c9e60705ac
parentba1a65fc518c367bd4a3e18324036d457e6a07c3
cmd/compile: improve error for wrong type in switch

Fixes #10561.

Provides a better diagnostic message for failed type switch
satisfaction in the case that a value receiver is being used
in place of the pointer receiver that implements and satisfies
the interface.

Change-Id: If8c13ba13f2a8d81bf44bac7c3a66c12921ba921
Reviewed-on: https://go-review.googlesource.com/35235
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/swt.go
test/switch6.go