aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/noder.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2020-12-31 21:32:52 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-01 10:52:10 +0000
commitb8fd3440cd3973a16184c4c878b557cf6c6703e4 (patch)
treed10fcc653ce9b25bd363946cc815c9c557c31853 /src/cmd/compile/internal/noder/noder.go
parentfd22df990545bce77ff78b27c4f7220c7a666a84 (diff)
downloadgo-b8fd3440cd3973a16184c4c878b557cf6c6703e4.tar.gz
go-b8fd3440cd3973a16184c4c878b557cf6c6703e4.zip
[dev.regabi] cmd/compile: report unused variables during typecheck
Unused variables are a type-checking error, so they should be reported during typecheck rather than walk. One catch is that we only want to report unused-variable errors for functions that type check successfully, but some errors are reported during noding, so we don't have an easy way to detect that currently. As an approximate solution, we simply check if we've reported any errors yet. Passes toolstash -cmp. Change-Id: I9400bfc94312c71d0c908a491e85c16d62224c9c Reviewed-on: https://go-review.googlesource.com/c/go/+/280973 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/noder/noder.go')
0 files changed, 0 insertions, 0 deletions