Skip to content

Commit 3bb51a6

Browse files
griesemergopherbot
authored andcommitted
spec: fix a couple of minor mistakes in type inference section
Change-Id: I9cdb301163b67add39928c8fc7df2b7f3893f45e Reviewed-on: https://go-review.googlesource.com/c/go/+/511836 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> TryBot-Bypass: Robert Griesemer <[email protected]> Auto-Submit: Robert Griesemer <[email protected]>
1 parent 15eea6a commit 3bb51a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/go_spec.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4526,7 +4526,7 @@ <h3 id="Type_inference">Type inference</h3>
45264526
<code>typeof(p<sub>i</sub>) ≡<sub>A</sub> typeof(a<sub>i</sub>)</code>.
45274527
<br>
45284528
If <code>a<sub>i</sub></code> is an untyped constant <code>c<sub>j</sub></code>,
4529-
and <code>p<sub>i</sub></code> is a bound type parameter <code>P<sub>k</sub></code>,
4529+
and <code>typeof(p<sub>i</sub>)</code> is a bound type parameter <code>P<sub>k</sub></code>,
45304530
the pair <code>(c<sub>j</sub>, P<sub>k</sub>)</code> is collected separately from
45314531
the type equations.
45324532
</p>
@@ -4543,7 +4543,7 @@ <h3 id="Type_inference">Type inference</h3>
45434543
<p>
45444544
For a return statement <code>return …, f, … </code> where <code>f</code> is a
45454545
generic function returned as a result to a (non-generic) result variable
4546-
of function type:
4546+
<code>r</code> of function type:
45474547
<br>
45484548
<code>typeof(r) ≡<sub>A</sub> typeof(f)</code>.
45494549
</p>

0 commit comments

Comments
 (0)