Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dev.unified] cmd/compile/internal/noder: explicit nil handling
Currently, uses of "nil" are handling as references to cmd/compile's own untyped "nil" object, and then we rely on implicitly converting that to its appropriate type. But there are cases where this can subtly go wrong (e.g., the switch test case added in the previous CL). Instead, explicitly handling "nil" expressions so that we can construct them directly with the appropriate type, as computed already by types2. Change-Id: I587f044f60f24e87525dde6d7dad6c58f14478de Reviewed-on: https://go-review.googlesource.com/c/go/+/418100 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com>
- Loading branch information