summaryrefslogtreecommitdiff
path: root/test/syntax
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-01-31 18:52:16 -0500
committerRuss Cox <rsc@golang.org>2011-01-31 18:52:16 -0500
commit257a4fe0daa54a6466356ca4e4c534d482ff2bda (patch)
treef4b17282e25dd2f1238f484de168de1951f19372 /test/syntax
parentf9f5975990179a1d9b40965dcb7f5e992fe8043c (diff)
downloadgo-257a4fe0daa54a6466356ca4e4c534d482ff2bda.tar.gz
gc: remove non-blocking send, receive syntax
R=ken2 CC=golang-dev http://codereview.appspot.com/4126043
Diffstat (limited to 'test/syntax')
-rw-r--r--test/syntax/chan1.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/syntax/chan1.go b/test/syntax/chan1.go
new file mode 100644
index 000000000..9c12e5e6f
--- /dev/null
+++ b/test/syntax/chan1.go
@@ -0,0 +1,17 @@
+// errchk $G -e $D/$F.go
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+var c chan int
+var v int
+
+func main() {
+ if c <- v { // ERROR "send statement.*value.*select"
+ }
+}
+
+var _ = c <- v // ERROR "send statement.*value.*select"