]> Cypherpunks.ru repositories - gostls13.git/commitdiff
spec: fix a couple of minor mistakes in type inference section
authorRobert Griesemer <gri@golang.org>
Thu, 20 Jul 2023 23:36:08 +0000 (16:36 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 21 Jul 2023 16:52:52 +0000 (16:52 +0000)
Change-Id: I9cdb301163b67add39928c8fc7df2b7f3893f45e
Reviewed-on: https://go-review.googlesource.com/c/go/+/511836
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>

doc/go_spec.html

index 7099f36020d76bad9662f7cd83b48ede397aa7f4..28aba70e4ffb3ef916f389a4774182d2b5e9920a 100644 (file)
@@ -4526,7 +4526,7 @@ The equations are as follows (type argument lists are omitted for clarity):
        <code>typeof(p<sub>i</sub>) ≡<sub>A</sub> typeof(a<sub>i</sub>)</code>.
        <br>
        If <code>a<sub>i</sub></code> is an untyped constant <code>c<sub>j</sub></code>,
-       and <code>p<sub>i</sub></code> is a bound type parameter <code>P<sub>k</sub></code>,
+       and <code>typeof(p<sub>i</sub>)</code> is a bound type parameter <code>P<sub>k</sub></code>,
        the pair <code>(c<sub>j</sub>, P<sub>k</sub>)</code> is collected separately from
        the type equations.
        </p>
@@ -4543,7 +4543,7 @@ The equations are as follows (type argument lists are omitted for clarity):
        <p>
        For a return statement <code>return …, f, … </code> where <code>f</code> is a
        generic function returned as a result to a (non-generic) result variable
-       of function type:
+       <code>r</code> of function type:
        <br>
        <code>typeof(r) ≡<sub>A</sub> typeof(f)</code>.
        </p>