From 2f3ff1fcdfd93ef596760532a3b47f1c6fb292f0 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Mon, 8 Apr 2024 12:49:22 -0400 Subject: [PATCH] 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 LUCI-TryBot-Result: Go LUCI --- src/go/types/api.go | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/go/types/api.go b/src/go/types/api.go index 796fe055e6..5b4f59c94e 100644 --- a/src/go/types/api.go +++ b/src/go/types/api.go @@ -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 ( -- 2.48.1