for the given import declaration.
</p>
- <p><!-- https://go.dev/issue/63223 -->
- TODO: <a href="https://go.dev/issue/63223">https://go.dev/issue/63223</a>: API changes to support explicit Alias nodes
+ <p><!-- https://go.dev/issue/63223, CL 521956, CL 541737 -->
+ The new <a href="/pkg/go/types#Alias"><code>Alias</code></a> type represents type aliases.
+ Previously, type aliases were not represented explicitly, so a reference to a type alias was equivalent
+ to spelling out the aliased type, and the name of the alias was lost.
+ The new representation retains the intermediate Alias.
+ This enables improved error reporting (the name of an alias can be reported), and allows for better handling
+ of cyclic type declarations involving type aliases.
+ In a future release, <code>Alias</code> types will also carry <a href="https://go.dev/issue/46477">type parameter information</a>.
+ The new function <a href="/pkg/go/types#Unalias"><code>Unalias</code></a> returns the actual type denoted by an
+ <code>Alias</code> type (or any other <a href="/pkg/go/types#Type"><code>Type</code></a> for that matter).
+ Because <code>Alias</code> types may break existing type switches that do not know to check for them,
+ this functionality is controlled by a <a href="/doc/godebug"><code>GODEBUG</code></a> field named <code>gotypesalias</code>.
+ With <code>gotypesalias=0</code>, everything behaves as before, and <code>Alias</code> types are never created.
+ With <code>gotypesalias=1</code>, <code>Alias</code> types are created and clients must expect them.
+ The default is <code>gotypesalias=0</code>.
+ In a future release, the default will be changed to <code>gotypesalias=1</code>.
</p>
<p><!-- https://go.dev/issue/61035, multiple CLs, see issue for details -->
<code>types.SizesFor("gc", "amd64")</code>.
</p>
- <p><!-- CL 541737 -->
- TODO: <a href="https://go.dev/cl/541737">https://go.dev/cl/541737</a>: go/types, types2: implement Alias proposal (export API); modified api/next/63223.txt
- </p>
-
<p><!-- https://go.dev/issue/64295, CL 544035 -->
- The start position (<a href="/pkg/go/types#Scope.Pos">Pos</a>)
- of the lexical environment block (<a href="/pkg/go/types#Scope">Scope</a>)
+ The start position (<a href="/pkg/go/types#Scope.Pos"><code>Pos</code></a>)
+ of the lexical environment block (<a href="/pkg/go/types#Scope"><code>Scope</code></a>)
that represents a function body has changed:
it used to start at the opening curly brace of the function body,
but now starts at the function's <code>func</code> token.