summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2014-07-20 12:25:24 -0700
committerIan Lance Taylor <iant@golang.org>2014-07-20 12:25:24 -0700
commitca862c5dc38c57a1662d735d3f46861fa06b1474 (patch)
tree317364316a0fa7eb62f1b9fbe73f38879b7951e3 /test
parent9d62d162ebf74faefa4bfbec23d14ba11bcbf4b6 (diff)
downloadgo-ca862c5dc38c57a1662d735d3f46861fa06b1474.tar.gz
test: avoid "declared but not used" errors in shift1.go
I'm improving gccgo's detection of variables that are only set but not used, and it triggers additional errors on this code. The new gccgo errors are correct; gc seems to suppress them due to the other, expected, errors. This change uses the variables so that no compiler will complain. gccgo change is http://codereview.appspot.com/119920043 . LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/116050043
Diffstat (limited to 'test')
-rw-r--r--test/shift1.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/shift1.go b/test/shift1.go
index 44a3792c4..04f5321b7 100644
--- a/test/shift1.go
+++ b/test/shift1.go
@@ -238,4 +238,6 @@ func _() {
z = (1. << s) << (1 << s) // ERROR "non-integer|type complex128"
z = (1. << s) << (1. << s) // ERROR "non-integer|type complex128"
z = (1.1 << s) << (1.1 << s) // ERROR "invalid|truncated|complex128"
+
+ _, _, _ = x, y, z
}