summaryrefslogtreecommitdiff
path: root/src/expvar
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-12-10 15:35:46 -0800
committerRobert Griesemer <gri@golang.org>2021-12-13 18:41:35 +0000
commit083ef5462494e81ee23316245c5d65085a3f62d9 (patch)
tree066b1b70238d6580d86b8107c17680ca61b9232e /src/expvar
parentacc65b47e12e2ba061b8ab4f86b183d039072776 (diff)
downloadgo-git-083ef5462494e81ee23316245c5d65085a3f62d9.tar.gz
spec: fix conversion rules (match implementation)
As written, the conversion P(x), where P and the type of x are type parameters with identical underlying types (i.e., identical constraints), is valid. However, unless the type of x and P are identical (which is covered with the assignability rule), such a conversion is not valid in general (consider the case where both type parameters are different type parameters with constraint "any"). This change adjusts the rules to prohibit type parameters in this case. The same reasoning applies and the analogue change is made for pointer types. The type checker already implements these updated rules. Change-Id: Id90187900cb2820f6a0a0cf582cf26cdf8addbce Reviewed-on: https://go-review.googlesource.com/c/go/+/371074 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/expvar')
0 files changed, 0 insertions, 0 deletions