diff options
-rw-r--r-- | api/go1.22.txt | 5 | ||||
-rw-r--r-- | doc/go1.22.html | 30 |
2 files changed, 29 insertions, 6 deletions
diff --git a/api/go1.22.txt b/api/go1.22.txt index 90ab686b11..d2a1ae7a88 100644 --- a/api/go1.22.txt +++ b/api/go1.22.txt @@ -48,7 +48,12 @@ pkg encoding/base64, method (*Encoding) AppendDecode([]uint8, []uint8) ([]uint8, pkg encoding/base64, method (*Encoding) AppendEncode([]uint8, []uint8) []uint8 #53693 pkg encoding/hex, func AppendDecode([]uint8, []uint8) ([]uint8, error) #53693 pkg encoding/hex, func AppendEncode([]uint8, []uint8) []uint8 #53693 +pkg go/ast, func NewPackage //deprecated #52463 pkg go/ast, func Unparen(Expr) Expr #60061 +pkg go/ast, type Importer //deprecated #52463 +pkg go/ast, type Object //deprecated #52463 +pkg go/ast, type Package //deprecated #52463 +pkg go/ast, type Scope //deprecated #52463 pkg go/types, func NewAlias(*TypeName, Type) *Alias #63223 pkg go/types, func Unalias(Type) Type #63223 pkg go/types, method (*Alias) Obj() *TypeName #63223 diff --git a/doc/go1.22.html b/doc/go1.22.html index 1393be1dc9..a7dd391aeb 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -340,12 +340,30 @@ Do not send CLs removing the interior tags from such phrases. <dl id="go/ast"><dt><a href="/pkg/go/ast/">go/ast</a></dt> <dd> - <p><!-- https://go.dev/issue/52463 --> - TODO: <a href="https://go.dev/issue/52463">https://go.dev/issue/52463</a>: formally deprecate Object - </p> - - <p><!-- CL 504915 --> - TODO: <a href="https://go.dev/cl/504915">https://go.dev/cl/504915</a>: go/ast: deprecate Object; modified api/go1.21.txt + <p><!-- https://go.dev/issue/52463, https://go/dev/cl/504915 --> + The following declarations related to + <a href='https://pkg.go.dev/go/ast#Object'>syntactic identifier resolution</a> + are now <a href="https://go.dev/issue/52463">deprecated</a>: + <code>Ident.Obj</code>, + <code>Object</code>, + <code>Scope</code>, + <code>File.Scope</code>, + <code>File.Unresolved</code>, + <code>Importer</code>, + <code>Package</code>, + <code>NewPackage</code>. + </p> + <p> + Identifiers cannot be accurately resolved without type information. + Consider, for example, the identifier <code>K</code> + in <code>T{K: ""}</code>: it could be the name of a local variable + if T is a map type, or the name of a field if T is a struct type. + </p> + <p> + New programs should use the <a href='/pkg/go/types'>go/types</a> + package to resolve identifiers; + see <code>Object</code>, <code>Info.Uses</code>, + and <code>Info.Defs</code> for details. </p> </dd> </dl><!-- go/ast --> |