diff options
author | Ryan Hitchman <hitchmanr@gmail.com> | 2010-12-09 13:41:24 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-12-09 13:41:24 -0500 |
commit | f980577064181bf8d24fe514c739305fce052968 (patch) | |
tree | 836ba915c21f1cffc2f2977481bf189f4f8960c5 /test/syntax | |
parent | e1d6b3c98d70a62000f452ff72be3ab2a0640dda (diff) | |
download | go-f980577064181bf8d24fe514c739305fce052968.tar.gz go-f980577064181bf8d24fe514c739305fce052968.zip |
gc: syntax error for incomplete chan type
Fixes #932.
R=rsc
CC=golang-dev
https://golang.org/cl/3515041
Diffstat (limited to 'test/syntax')
-rw-r--r-- | test/syntax/chan.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/syntax/chan.go b/test/syntax/chan.go new file mode 100644 index 0000000000..48beb1e709 --- /dev/null +++ b/test/syntax/chan.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 + +type xyz struct { + ch chan +} // ERROR "unexpected } in channel type" + +func Foo(y chan) { // ERROR "unexpected \) in channel type" +} + +func Bar(x chan, y int) { // ERROR "unexpected comma in channel type" +} |