@@ -144,19 +144,19 @@ <h3 id="generics">Generics</h3>
144
144
</ p>
145
145
146
146
< p >
147
- The current generics implementation has the following limitations:
147
+ The current generics implementation has the following known limitations:
148
148
< ul >
149
149
< 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
151
151
or methods. We hope to provide support for this feature in Go 1.19.
152
152
</ li >
153
153
< 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
155
155
the predeclared functions < code > real</ code > , < code > imag</ code > , and < code > complex</ code > .
156
156
We hope to remove this restriction in Go 1.19.
157
157
</ li >
158
158
< 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
160
160
< code > x</ code > of type parameter type < code > P</ code > if < code > m</ code > is explicitly
161
161
declared by < code > P</ code > 's constraint interface.
162
162
Similarly, method values < code > x.m</ code > and method expressions
@@ -165,6 +165,12 @@ <h3 id="generics">Generics</h3>
165
165
of < code > P</ code > by virtue of the fact that all types in < code > P</ code > implement
166
166
< code > m</ code > . We hope to remove this restriction in Go 1.19.
167
167
</ 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 >
168
174
< li > <!-- https://golang.org/issue/49030 -->
169
175
Embedding a type parameter, or a pointer to a type parameter, as
170
176
an unnamed field in a struct type is not permitted. Similarly,
0 commit comments