]> Cypherpunks repositories - gostls13.git/commitdiff
spec: correct assignment rules with respect to type parameters
authorRobert Griesemer <gri@golang.org>
Wed, 11 May 2022 22:08:38 +0000 (15:08 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 12 May 2022 04:47:18 +0000 (04:47 +0000)
Fixes #52628.

Change-Id: If4261abc25868d62f7689253d40f872692c23a4d
Reviewed-on: https://go-review.googlesource.com/c/go/+/405755
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
doc/go_spec.html

index 70efddf626944ad7d0515683b525b01e89891790..f6e87fe8a41044d4858ea576cbec581a082ad54d 100644 (file)
@@ -1920,7 +1920,8 @@ A value <code>x</code> of type <code>V</code> is <i>assignable</i> to a <a href=
 </li>
 <li>
 <code>V</code> and <code>T</code> have identical
-<a href="#Underlying_types">underlying types</a> and at least one of <code>V</code>
+<a href="#Underlying_types">underlying types</a>
+but are not type parameters and at least one of <code>V</code>
 or <code>T</code> is not a <a href="#Types">named type</a>.
 </li>
 <li>