• Robert Griesemer's avatar
    spec: type assertions and type switches must be valid · 48567318
    Robert Griesemer authored
    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
    48567318
go_spec.html 171 KB