diff --git a/doc/go1.22.html b/doc/go1.22.html index 9a84d3dd74..fb45dfe45f 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -368,6 +368,54 @@ Do not send CLs removing the interior tags from such phrases. +
+ 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.
+
+ The Info struct now exports the
+ FileVersions map
+ which provides per-file Go version information.
+
+ The new helper method PkgNameOf returns the local package name
+ for the given import declaration.
+
+ The implementation of SizesFor has been adjusted to compute
+ the same type sizes as the compiler when the compiler argument for SizesFor is "gc".
+ The default Sizes implementation used by the type checker is now
+ types.SizesFor("gc", "amd64").
+
+ 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.
+
@@ -506,54 +554,6 @@ Do not send CLs removing the interior tags from such phrases.
- The new helper method PkgNameOf returns the local package name
- for the given import declaration.
-
- 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.
-
- The implementation of SizesFor has been adjusted to compute
- the same type sizes as the compiler when the compiler argument for SizesFor is "gc".
- The default Sizes implementation used by the type checker is now
- types.SizesFor("gc", "amd64").
-
- 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.
-
- The Info struct now exports the
- FileVersions map
- which provides per-file Go version information.
-