]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: correct type identity comparison with "any"
authorCherry Mui <cherryyz@google.com>
Wed, 15 Dec 2021 17:34:34 +0000 (12:34 -0500)
committerCherry Mui <cherryyz@google.com>
Wed, 15 Dec 2021 20:26:03 +0000 (20:26 +0000)
commitbc0aba971705722b6798746b2003908166ee007b
tree02bff760aa6aa0407218e7a6eaf96522b2065036
parent83fc0978e5d953ed058ca30bcfb8ddbc9ebdd88d
cmd/compile: correct type identity comparison with "any"

The builtin "any" type should only be identical to an unnamed empty
interface type, not a defined empty interface type.

Fixes #50169.

Change-Id: Ie5bb88868497cb795de1fd0276133ba9812edfe4
Reviewed-on: https://go-review.googlesource.com/c/go/+/372217
Trust: Cherry Mui <cherryyz@google.com>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types/identity.go
test/fixedbugs/issue50169.go [new file with mode: 0644]