blob: eafa076481a88eebb4feb678b592b626c04f4c00 [file] [log] [blame]
Russ Cox57eb06f2012-02-16 23:51:04 -05001// compile
Russ Coxebc10db2009-02-18 10:07:46 -08002
3// Copyright 2009 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
Rob Pike19bab1d2012-02-24 10:30:39 +11007// Test that types can be parenthesized.
8
Russ Coxebc10db2009-02-18 10:07:46 -08009package main
10
11func f(interface{})
12func g() {}
13func main() {
Rob Pike4f61fc92010-09-04 10:36:13 +100014 f(map[string]string{"a":"b","c":"d"})
15 f([...]int{1,2,3})
16 f(map[string]func(){"a":g,"c":g})
17 f(make(chan(<-chan int)))
18 f(make(chan<-(chan int)))
Russ Coxebc10db2009-02-18 10:07:46 -080019}