From baeb70359e9af0cdcbc846a794222a7d0ee8b360 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 4 Dec 2023 13:31:23 -0800 Subject: [PATCH] doc: re-arrange release notes for go/types Better order in description of changes to go/types. Move go/types section up so it's in alphabetical order again. No changes to actual content. Change-Id: If2f085b665b412489e5dfdba79b7f93598ff2785 Reviewed-on: https://go-review.googlesource.com/c/go/+/546359 Reviewed-by: Alan Donovan Reviewed-by: Robert Griesemer Auto-Submit: Robert Griesemer TryBot-Bypass: Robert Griesemer --- doc/go1.22.html | 96 ++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/doc/go1.22.html b/doc/go1.22.html index 9a84d3dd740b7d..fb45dfe45f9b99 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -368,6 +368,54 @@

Minor changes to the library

+
go/types
+
+

+ 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. +

+
+
+
go/version

@@ -506,54 +554,6 @@

Minor changes to the library

-
go/types
-
-

- 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. -

-
-
-
reflect