aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/decl.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-03-29 11:36:44 -0700
committerRobert Griesemer <gri@golang.org>2021-03-31 04:13:28 +0000
commit34fb2b2ed5687ec85aa8c1db1481bb4f31b35b29 (patch)
treea7136a5cc24af882b42e2b8eebe876beb372b863 /src/cmd/compile/internal/types2/decl.go
parent0e8a72b62efa44fa01eccb94d47a051366cb6d17 (diff)
downloadgo-34fb2b2ed5687ec85aa8c1db1481bb4f31b35b29.tar.gz
go-34fb2b2ed5687ec85aa8c1db1481bb4f31b35b29.zip
cmd/compile/internal/types2: review of decl.go
The changes between (equivalent, and reviewed) go/types/decl.go and decl.go can be seen by comparing patchset 1 and 2. The actual changes are removing the "// UNREVIEWED" marker and a minor comment update. The primary differences to go/types/decl.go are: - use of syntax rather than go/ast package - use of error_ objects to collect follow-on error info - use of check.conf.Trace rather than global trace flag - more aggressively marking variables as used in the presence errors - not using a walkDecl abstraction for const/var/type declarations Change-Id: I5cf26779c9939b686a3dbaa4d38fdd0c154a92ca Reviewed-on: https://go-review.googlesource.com/c/go/+/305570 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/decl.go')
-rw-r--r--src/cmd/compile/internal/types2/decl.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/types2/decl.go b/src/cmd/compile/internal/types2/decl.go
index 07a22e8aad..9d8c39ddbe 100644
--- a/src/cmd/compile/internal/types2/decl.go
+++ b/src/cmd/compile/internal/types2/decl.go
@@ -1,4 +1,3 @@
-// UNREVIEWED
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -325,7 +324,7 @@ func (check *Checker) validType(typ Type, path []Object) typeInfo {
}
// don't report a 2nd error if we already know the type is invalid
- // (e.g., if a cycle was detected earlier, via Checker.underlying).
+ // (e.g., if a cycle was detected earlier, via under).
if t.underlying == Typ[Invalid] {
t.info = invalid
return invalid