cmd/compile/internal/types2: review of api.go

The changes between (equivalent, and reviewed) go/types/api.go
and api.go can be seen by comparing patchset 1 and 2. The actual
changes are removing the "// UNREVIEWED" marker.

The primary differences to go/types/api.go are:
- use of syntax instead of go/ast package
- use of simpler Error type (for now)
- additional exported Config flags
- different handling of nil values (we can't use Typ[UntypedNil]
  to represent an untyped nil because types2 gives such nil values
  context-dependent types)

Change-Id: I7d46b29d460c656d7a36fe70108a370383266373
Reviewed-on: https://go-review.googlesource.com/c/go/+/304050
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Robert Griesemer 2021-03-23 11:55:16 -07:00
parent c69515c9fd
commit 607f99904e

View file

@ -1,4 +1,3 @@
// UNREVIEWED
// Copyright 2012 The Go Authors. All rights reserved. // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
@ -23,8 +22,6 @@
// and checks for compliance with the language specification. // and checks for compliance with the language specification.
// Use Info.Types[expr].Type for the results of type inference. // Use Info.Types[expr].Type for the results of type inference.
// //
// For a tutorial, see https://golang.org/s/types-tutorial.
//
package types2 package types2
import ( import (