<!--{
"Title": "The Go Programming Language Specification",
- "Subtitle": "Version of March 10, 2022",
+ "Subtitle": "Version of March 30, 2022",
"Path": "/ref/spec"
}-->
</pre>
<p>
-In a union, a term cannot be a <a href="#Type_parameter_declarations">type parameter</a>, and the type sets of all
+The type <code>T</code> in a term of the form <code>T</code> or <code>~T</code> cannot
+be a <a href="#Type_parameter_declarations">type parameter</a>, and the type sets of all
non-interface terms must be pairwise disjoint (the pairwise intersection of the type sets must be empty).
Given a type parameter <code>P</code>:
</p>
<pre>
interface {
P // illegal: P is a type parameter
- int | P // illegal: P is a type parameter
+ int | ~P // illegal: P is a type parameter
~int | MyInt // illegal: the type sets for ~int and MyInt are not disjoint (~int includes MyInt)
float32 | Float // overlapping type sets but Float is an interface
}
<p>
For a generic function, type arguments may be provided explicitly, or they
may be partially or completely <a href="#Type_inference">inferred</a>.
-A generic function that is is <i>not</i> <a href="#Calls">called</a> requires a
+A generic function that is <i>not</i> <a href="#Calls">called</a> requires a
type argument list for instantiation; if the list is partial, all
remaining type arguments must be inferrable.
A generic function that is called may provide a (possibly partial) type