]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types2: make sure we are safe for nil in underIs
authorRobert Griesemer <gri@golang.org>
Fri, 12 Nov 2021 21:23:45 +0000 (13:23 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 12 Nov 2021 23:26:33 +0000 (23:26 +0000)
commit3a4b95073a9fd7bca6e9fd80016275ef04bc1987
tree2047c9172ffa7fc564ce8741e22d22c50317be77
parent429d1e01557f95bba29837f2190441696484fd41
cmd/compile/internal/types2: make sure we are safe for nil in underIs

Reviewed all uses of underIs (global function and method) and made
sure we are ok with a nil incoming argument (indicating a type set
with no specific types).

Added a couple of checks where we didn't have them (and somehow
didn't run into a problem yet).

Change-Id: Ifde45a3a80ddf2b1a19c83f79258ad8207dfb09f
Reviewed-on: https://go-review.googlesource.com/c/go/+/363658
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/types2/expr.go
src/cmd/compile/internal/types2/predicates.go
src/cmd/compile/internal/types2/type.go