aboutsummaryrefslogtreecommitdiff
path: root/test/shift1.go
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
commit8259b0136e1838e440ff32785622a4cc22c14d55 (patch)
tree31b4d09e42824926edb37d8c33a4892f59fdb726 /test/shift1.go
parent6eb5eb398b7c37079526bbf7d5987be8c054bb50 (diff)
downloadgo-8259b0136e1838e440ff32785622a4cc22c14d55.tar.gz
go-8259b0136e1838e440ff32785622a4cc22c14d55.zip
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 https://golang.org/cl/119920043 . LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/116050043
Diffstat (limited to 'test/shift1.go')
-rw-r--r--test/shift1.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/shift1.go b/test/shift1.go
index 44a3792c4f..04f5321b73 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
}