aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/noder.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-06-03 18:00:53 -0700
committerMatthew Dempsky <mdempsky@google.com>2021-06-04 01:26:43 +0000
commitb29b123e079183a05abc1066007a51d4f565cd88 (patch)
tree30fa469c4d6ba81915a2c5fc4d5eec93237d21dc /src/cmd/compile/internal/noder/noder.go
parent6d9830111402d9bd69893a8ad6074ac92a5ddd0d (diff)
downloadgo-b29b123e079183a05abc1066007a51d4f565cd88.tar.gz
go-b29b123e079183a05abc1066007a51d4f565cd88.zip
cmd/compile: remove spurious ir.Dump
This ir.Dump call is a debugging artifact introduced in golang.org/cl/274103, which should never be printed for valid, non-generic code, but evidently can now sometimes appear due to how the parser handles invalid syntax. The parser should probably not recognize "x[2]" as a type expression in non-generics mode, but also probably we shouldn't try noding after reporting syntax errors. Either way, this diagnostic has outlived its usefulness, and noder's days are numbered anyway, so we might as well just remove it to save end users any confusion. Updates #46558. Change-Id: Ib68502ef834d610b883c2f2bb11d9b385bc66e37 Reviewed-on: https://go-review.googlesource.com/c/go/+/324991 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/noder/noder.go')
-rw-r--r--src/cmd/compile/internal/noder/noder.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/noder/noder.go b/src/cmd/compile/internal/noder/noder.go
index 4c7c9fc322..5fcad096c2 100644
--- a/src/cmd/compile/internal/noder/noder.go
+++ b/src/cmd/compile/internal/noder/noder.go
@@ -882,9 +882,6 @@ func (p *noder) typeExpr(typ syntax.Expr) ir.Ntype {
if n == nil {
return nil
}
- if _, ok := n.(ir.Ntype); !ok {
- ir.Dump("NOT NTYPE", n)
- }
return n.(ir.Ntype)
}