Skip to content

Commit f5512f0

Browse files
griesemerdmitshur
authored andcommitted
_content/doc: update Go 1.18 release notes
Document field access limitations for type parameters. Also, remove some superfluous "currently" uses - the time context is clear from the introductory paragraph of the respective section. For golang/go#51576. For golang/go#47694. Change-Id: If4c12f95f024894a9efb949dda9341d8ab0dc77e Reviewed-on: https://go-review.googlesource.com/c/website/+/391279 Reviewed-by: DO NOT USE <[email protected]> Trust: Dmitri Shuralyov <[email protected]>
1 parent c3338c2 commit f5512f0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

_content/doc/go1.18.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,19 @@ <h3 id="generics">Generics</h3>
144144
</p>
145145

146146
<p>
147-
The current generics implementation has the following limitations:
147+
The current generics implementation has the following known limitations:
148148
<ul>
149149
<li><!-- https://golang.org/issue/47631 -->
150-
The Go compiler cannot currently handle type declarations inside generic functions
150+
The Go compiler cannot handle type declarations inside generic functions
151151
or methods. We hope to provide support for this feature in Go 1.19.
152152
</li>
153153
<li><!-- https://golang.org/issue/50937 -->
154-
The Go compiler currently does not accept arguments of type parameter type with
154+
The Go compiler does not accept arguments of type parameter type with
155155
the predeclared functions <code>real</code>, <code>imag</code>, and <code>complex</code>.
156156
We hope to remove this restriction in Go 1.19.
157157
</li>
158158
<li><!-- https://golang.org/issue/51183 -->
159-
The Go compiler currently only supports calling a method <code>m</code> on a value
159+
The Go compiler only supports calling a method <code>m</code> on a value
160160
<code>x</code> of type parameter type <code>P</code> if <code>m</code> is explicitly
161161
declared by <code>P</code>'s constraint interface.
162162
Similarly, method values <code>x.m</code> and method expressions
@@ -165,6 +165,12 @@ <h3 id="generics">Generics</h3>
165165
of <code>P</code> by virtue of the fact that all types in <code>P</code> implement
166166
<code>m</code>. We hope to remove this restriction in Go 1.19.
167167
</li>
168+
<li><!-- https://golang.org/issue/51576 -->
169+
The Go compiler does not support accessing a struct field <code>x.f</code>
170+
where <code>x</code> is of type parameter type even if all types in the
171+
type parameter's type set have a field <code>f</code>.
172+
We may remove this restriction in Go 1.19.
173+
</li>
168174
<li><!-- https://golang.org/issue/49030 -->
169175
Embedding a type parameter, or a pointer to a type parameter, as
170176
an unnamed field in a struct type is not permitted. Similarly,

0 commit comments

Comments
 (0)