Skip to content

Commit

Permalink
spec: fix a couple of minor mistakes in type inference section
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
griesemer authored and gopherbot committed Jul 21, 2023
1 parent 15eea6a commit 3bb51a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/go_spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4526,7 +4526,7 @@ <h3 id="Type_inference">Type inference</h3>
<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>
Expand All @@ -4543,7 +4543,7 @@ <h3 id="Type_inference">Type inference</h3>
<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>
Expand Down

0 comments on commit 3bb51a6

Please sign in to comment.