Descriptionspec: 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 issue 4472.
Patch Set 1 #Patch Set 2 : diff -r 1f3ebf9a7548 https://code.google.com/p/go #Patch Set 3 : diff -r 1f3ebf9a7548 https://code.google.com/p/go #
Total comments: 4
Patch Set 4 : diff -r 1f3ebf9a7548 https://code.google.com/p/go #Patch Set 5 : diff -r 08462805eb2c https://code.google.com/p/go #
Total comments: 4
Patch Set 6 : diff -r 08462805eb2c https://code.google.com/p/go #Patch Set 7 : diff -r 644271a17661 https://code.google.com/p/go #
Total comments: 6
Patch Set 8 : diff -r 52c9c412f1f2 https://code.google.com/p/go #MessagesTotal messages: 8
|