Russ Cox | 57eb06f | 2012-02-16 23:51:04 -0500 | [diff] [blame] | 1 | // compile |
Russ Cox | ebc10db | 2009-02-18 10:07:46 -0800 | [diff] [blame] | 2 | |
| 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 Pike | 19bab1d | 2012-02-24 10:30:39 +1100 | [diff] [blame] | 7 | // Test that types can be parenthesized. |
| 8 | |
Russ Cox | ebc10db | 2009-02-18 10:07:46 -0800 | [diff] [blame] | 9 | package main |
| 10 | |
| 11 | func f(interface{}) |
| 12 | func g() {} |
| 13 | func main() { |
Rob Pike | 4f61fc9 | 2010-09-04 10:36:13 +1000 | [diff] [blame] | 14 | 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 Cox | ebc10db | 2009-02-18 10:07:46 -0800 | [diff] [blame] | 19 | } |