mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
doc/go1.18: mention that embedding a type parameter is forbidden
For #47694 Change-Id: Ibf38eabcb78abc563fcf77e2b566175a18c06fa3 Reviewed-on: https://go-review.googlesource.com/c/go/+/372114 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
c948823cb7
commit
9d0ca262bb
|
@ -97,6 +97,12 @@ Do not send CLs removing the interior tags from such phrases.
|
||||||
The Go compiler cannot currently handle type declarations inside generic functions
|
The Go compiler cannot currently handle type declarations inside generic functions
|
||||||
or methods. We hope to provide support for this feature in Go 1.19.
|
or methods. We hope to provide support for this feature in Go 1.19.
|
||||||
</li>
|
</li>
|
||||||
|
<li><!-- https://golang.org/issue/49030 -->
|
||||||
|
Embedding a type parameter, or a pointer to a type parameter, as
|
||||||
|
an unnamed field in a struct type is not permitted. Similarly
|
||||||
|
embedding a type parameter in an interface type is not permitted.
|
||||||
|
Whether these will ever be permitted is unclear at present.
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue