aboutsummaryrefslogtreecommitdiff
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
commitcb584707af2d8803adba88fd9692e665ecd2f059 (patch)
treecae7a6ff314f632ae9cdd940798955a8154ebb11 /test/syntax
parentf4e76d83091b43e88bb2a832c3b6424c3cc17e1d (diff)
downloadgo-cb584707af2d8803adba88fd9692e665ecd2f059.tar.gz
go-cb584707af2d8803adba88fd9692e665ecd2f059.zip
gc: remove non-blocking send, receive syntax
R=ken2 CC=golang-dev https://golang.org/cl/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 0000000000..9c12e5e6fe
--- /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"