mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
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 <iant@google.com> Reviewed-by: Robert Griesemer <gri@google.com> TryBot-Bypass: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
This commit is contained in:
parent
15eea6a193
commit
3bb51a6805
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user