aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/stmt.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-08-25 18:13:28 -0700
committerRobert Griesemer <gri@golang.org>2021-08-26 17:18:58 +0000
commitd6bdae33e918f779e9e50c020d32042e569368e2 (patch)
tree6501f50076254d35b8907513c626461724071f42 /src/cmd/compile/internal/types2/stmt.go
parent770df2e18df01e64f8770301b0d3a5d6bfa04027 (diff)
downloadgo-d6bdae33e918f779e9e50c020d32042e569368e2.tar.gz
go-d6bdae33e918f779e9e50c020d32042e569368e2.zip
cmd/compile/internal/types2: address some TODOs (cleanup)
- Address some easy TODOs. - Remove some TODOs that are not correct anymore or are unimportent. - Simplify some code on the way. Change-Id: I4d20de3725b3a735022afe022cbc002b2798936d Reviewed-on: https://go-review.googlesource.com/c/go/+/345176 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/stmt.go')
-rw-r--r--src/cmd/compile/internal/types2/stmt.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/cmd/compile/internal/types2/stmt.go b/src/cmd/compile/internal/types2/stmt.go
index 7865c2d4f4..8cfdf92e67 100644
--- a/src/cmd/compile/internal/types2/stmt.go
+++ b/src/cmd/compile/internal/types2/stmt.go
@@ -52,11 +52,6 @@ func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body
check.error(body.Rbrace, "missing return")
}
- // TODO(gri) Should we make it an error to declare generic functions
- // where the type parameters are not used?
- // 12/19/2018: Probably not - it can make sense to have an API with
- // all functions uniformly sharing the same type parameters.
-
// spec: "Implementation restriction: A compiler may make it illegal to
// declare a variable inside a function body if the variable is never used."
check.usage(sig.scope)
@@ -422,7 +417,6 @@ func (check *Checker) stmt(ctxt stmtContext, s syntax.Stmt) {
check.assignVar(lhs[0], &x)
case *syntax.CallStmt:
- // TODO(gri) get rid of this conversion to string
kind := "go"
if s.Tok == syntax.Defer {
kind = "defer"