go/types: update package doc

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>
This commit is contained in:
Alan Donovan 2024-04-08 12:49:22 -04:00
parent 28b5d80d8d
commit 2f3ff1fcdf
1 changed files with 14 additions and 10 deletions

View File

@ -10,19 +10,23 @@
//
// 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 (