Ryan Hitchman | f980577 | 2010-12-09 13:41:24 -0500 | [diff] [blame] | 1 | // errchk $G -e $D/$F.go |
| 2 | |
| 3 | // Copyright 2010 The Go Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | package main |
| 8 | |
| 9 | type xyz struct { |
| 10 | ch chan |
Ian Lance Taylor | 0bc37a6 | 2011-03-29 06:47:39 -0700 | [diff] [blame] | 11 | } // ERROR "unexpected .*}.* in channel type" |
Ryan Hitchman | f980577 | 2010-12-09 13:41:24 -0500 | [diff] [blame] | 12 | |
Ian Lance Taylor | 0bc37a6 | 2011-03-29 06:47:39 -0700 | [diff] [blame] | 13 | func Foo(y chan) { // ERROR "unexpected .*\).* in channel type" |
Ryan Hitchman | f980577 | 2010-12-09 13:41:24 -0500 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | func Bar(x chan, y int) { // ERROR "unexpected comma in channel type" |
| 17 | } |