go /
go /
485673188dc6c3ee3113990ed1e96ca8f8f0df51 spec: type assertions and type switches must be valid
The spec didn't preclude invalid type assertions and
type switches, i.e., cases where a concrete type doesn't
implement the interface type in the assertion in the first
place. Both, the gc and gccgo compiler exclude these cases.
This is documenting the status quo.
Also:
- minor clean up of respective examples
- added sentence about default case in select statements
Fixes #4472.
R=rsc, iant, r, ken
CC=golang-dev
https://golang.org/cl/6869050
1 file changed