diff --git a/doc/go1.22.html b/doc/go1.22.html index 7642ff5bfd78e..9a84d3dd740b7 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -513,8 +513,22 @@

Minor changes to the library

for the given import declaration.

-

- TODO: https://go.dev/issue/63223: API changes to support explicit Alias nodes +

+ The new Alias 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, Alias types will also carry type parameter information. + The new function Unalias returns the actual type denoted by an + Alias type (or any other Type for that matter). + Because Alias types may break existing type switches that do not know to check for them, + this functionality is controlled by a GODEBUG field named gotypesalias. + With gotypesalias=0, everything behaves as before, and Alias types are never created. + With gotypesalias=1, Alias types are created and clients must expect them. + The default is gotypesalias=0. + In a future release, the default will be changed to gotypesalias=1.

@@ -524,13 +538,9 @@

Minor changes to the library

types.SizesFor("gc", "amd64").

-

- TODO: https://go.dev/cl/541737: go/types, types2: implement Alias proposal (export API); modified api/next/63223.txt -

-

- The start position (Pos) - of the lexical environment block (Scope) + The start position (Pos) + of the lexical environment block (Scope) 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 func token.