compiler: cast comparison function result to expected bool type
authorIan Lance Taylor <iant@golang.org>
Thu, 3 Dec 2020 02:11:00 +0000 (18:11 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 3 Dec 2020 16:27:41 +0000 (08:27 -0800)
commit17c9cf3c17651950bd4bfefcbe15440fa2155810
tree03367d24299f66cc435a6b1eecd846f33543095e
parentcd34d5f2c40f3c65407f4b0bee0b49fc84e4a4ab
compiler: cast comparison function result to expected bool type

Otherwise cases like
    type mybool bool
    var b mybool = [10]string{} == [10]string{}
get an incorrect type checking error.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/274446
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/expressions.h