blob: 210acc43075d344ca8480f276713b573b0564d22 [file] [log] [blame]
Russ Cox2b1c9b42012-02-16 23:49:30 -05001// run
Russ Cox5d754bf2009-12-15 16:22:04 -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
7package main
8
9type S string
10type I int
Russ Coxf2b5a072011-01-19 23:09:00 -050011type F float64
Russ Cox5d754bf2009-12-15 16:22:04 -080012
13func (S) m() {}
14func (I) m() {}
15func (F) m() {}
16
17func main() {
Russ Coxf2b5a072011-01-19 23:09:00 -050018 c := make(chan interface {
19 m()
20 },
21 10)
Russ Cox5d754bf2009-12-15 16:22:04 -080022 c <- I(0)
23 c <- F(1)
24 c <- S("hi")
25 <-c
26 <-c
27 <-c
28}