]> Cypherpunks repositories - gostls13.git/commit
go/constant: fix complex != unknown comparison
authorgoto1134 <1134togo@gmail.com>
Mon, 25 Aug 2025 15:41:53 +0000 (15:41 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 29 Aug 2025 00:14:30 +0000 (17:14 -0700)
commit13bb48e6fbc35419a28747688426eb3684242fbc
tree02241d3db96030948cdacda3fd4ab7ecc0617357
parentba1109feb515c2eb013399f53be5f17cfe1f189f
go/constant: fix complex != unknown comparison

By the contract of Compare, if one operand is Unknown, the result must be
false.

Fixes #75137

Change-Id: I56420fae808395f89769f5e5d448f9e1df9a622f
GitHub-Last-Rev: 858ba89a91bf966223975541af739ab0ab977075
GitHub-Pull-Request: golang/go#75140
Reviewed-on: https://go-review.googlesource.com/c/go/+/698955
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/constant/value.go
src/go/constant/value_test.go