]> Cypherpunks repositories - gostls13.git/commit
go/types: fix unsymmetric test when typechecking comparisons
authorRobert Griesemer <gri@golang.org>
Fri, 19 Oct 2018 00:39:35 +0000 (17:39 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 19 Oct 2018 17:48:06 +0000 (17:48 +0000)
commit34585ba51e365e5041f5ee0264e0b46b0ccc95db
tree16ebea10901c8519d3439a3fa976d200832aa1fe
parentff99a61e5e892dedb88f9f80bce9cc102d2f50b2
go/types: fix unsymmetric test when typechecking comparisons

The existing code assumed that comparability and orderedness
was implied for the 2nd operand if the 1st operand satisfied
these predicates.

Fixes #28164.

Change-Id: I61d4e5eedb3297731a20a14acb3645d11b36fcc5
Reviewed-on: https://go-review.googlesource.com/c/143277
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/go/types/expr.go
src/go/types/testdata/expr2.src