• Robert Griesemer's avatar
    cmd/compile: better handling of incorrect type switches · c65a2781
    Robert Griesemer authored
    Don't report errors if we don't have a correct type switch
    guard; instead ignore it and leave it to the type-checker
    to report the error. This leads to better error messages
    concentrating on the type switch guard rather than errors
    around (confusing) syntactic details.
    
    Also clean up some code setting up AssertExpr (they never
    have a nil Type field) and remove some incorrect TODOs.
    
    Fixes #24470.
    
    Change-Id: I69512f36e0417e3b5ea9c8856768e04b19d654a8
    Reviewed-on: https://go-review.googlesource.com/103615
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    c65a2781
Name
Last commit
Last update
..
chan.go Loading commit data...
chan1.go Loading commit data...
composite.go Loading commit data...
ddd.go Loading commit data...
else.go Loading commit data...
if.go Loading commit data...
import.go Loading commit data...
initvar.go Loading commit data...
interface.go Loading commit data...
semi1.go Loading commit data...
semi2.go Loading commit data...
semi3.go Loading commit data...
semi4.go Loading commit data...
semi5.go Loading commit data...
semi6.go Loading commit data...
semi7.go Loading commit data...
topexpr.go Loading commit data...
typesw.go Loading commit data...
vareq.go Loading commit data...
vareq1.go Loading commit data...