]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: update package doc
authorAlan Donovan <adonovan@google.com>
Mon, 8 Apr 2024 16:49:22 +0000 (12:49 -0400)
committerAlan Donovan <adonovan@google.com>
Fri, 12 Apr 2024 19:15:43 +0000 (19:15 +0000)
It wasn't DocLink compatible in a number of ways.

Change-Id: Ib7ab9a908ef47561ac70cdc0c157d49dcfd03a02
Reviewed-on: https://go-review.googlesource.com/c/go/+/577375
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/go/types/api.go

index 796fe055e646e5af7ac92bec3326f22816bc358a..5b4f59c94e66d9aa321aaa75c984a218d1f5728f 100644 (file)
 //
 // Type-checking consists of several interdependent phases:
 //
-// Name resolution maps each identifier (ast.Ident) in the program to the
-// language object ([Object]) it denotes.
-// Use [Info].{Defs,Uses,Implicits} for the results of name resolution.
+// Name resolution maps each identifier ([ast.Ident]) in the program
+// to the symbol ([Object]) it denotes. Use the Defs and Uses fields
+// of [Info] or the [Info.ObjectOf] method to find the symbol for an
+// identifier, and use the Implicits field of [Info] to find the
+// symbol for certain other kinds of syntax node.
 //
-// Constant folding computes the exact constant value (constant.Value)
-// for every expression (ast.Expr) that is a compile-time constant.
-// Use Info.Types[expr].Value for the results of constant folding.
+// Constant folding computes the exact constant value
+// ([constant.Value]) of every expression ([ast.Expr]) that is a
+// compile-time constant. Use the Types field of [Info] to find the
+// results of constant folding for an expression.
 //
-// [Type] inference computes the type ([Type]) of every expression ([ast.Expr])
-// and checks for compliance with the language specification.
-// Use [Info.Types][expr].Type for the results of type inference.
+// Type deduction computes the type ([Type]) of every expression
+// ([ast.Expr]) and checks for compliance with the language
+// specification. Use the Types field of [Info] for the results of
+// type deduction.
 //
-// For a tutorial, see https://golang.org/s/types-tutorial.
+// For a tutorial, see https://go.dev/s/types-tutorial.
 package types
 
 import (