mirror of
https://github.com/golang/go
synced 2024-11-17 08:04:46 -07:00
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>
This commit is contained in:
parent
6d98301114
commit
b29b123e07
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user