From 758ff64c69e34965f8af5b2d6ffd65e8d7ab2150 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Mon, 14 Feb 2011 13:23:51 +0100 Subject: Imported Upstream version 2011-02-01.1 --- test/syntax/chan1.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/syntax/chan1.go (limited to 'test/syntax/chan1.go') 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" -- cgit v1.2.3