summaryrefslogtreecommitdiff
path: root/test/import3.go
blob: 274fcfe42ab0e9b650c0433bcfdbc1b4d40620e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// $G $D/import2.go && $G $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.

// Test that all the types from import2.go made it
// intact and with the same meaning, by assigning to or using them.

package main

import "./import2"

func f3(func() func() int)

func main() {
	p.F3(p.F1)
	p.F3(p.F2())
	f3(p.F1)
	f3(p.F2())

	p.C1 = (chan<- (chan int))(nil)
	p.C2 = (chan (<-chan int))(nil)
	p.C3 = (<-chan (chan int))(nil)
	p.C4 = (chan (chan<- int))(nil)

	p.C5 = (<-chan (<-chan int))(nil)
	p.C6 = (chan<- (<-chan int))(nil)
	p.C7 = (chan<- (chan<- int))(nil)

	p.C8 = (<-chan (<-chan (chan int)))(nil)
	p.C9 = (<-chan (chan<- (chan int)))(nil)
	p.C10 = (chan<- (<-chan (chan int)))(nil)
	p.C11 = (chan<- (chan<- (chan int)))(nil)
	p.C12 = (chan (chan<- (<-chan int)))(nil)
	p.C13 = (chan (chan<- (chan<- int)))(nil)

	p.R1 = (chan <- chan int)(nil)
	p.R3 = (<- chan chan int)(nil)
	p.R4 = (chan chan <- int)(nil)

	p.R5 = (<- chan <- chan int)(nil)
	p.R6 = (chan <- <- chan int)(nil)
	p.R7 = (chan <- chan <- int)(nil)

	p.R8 = (<- chan <- chan chan int)(nil)
	p.R9 = (<- chan chan <- chan int)(nil)
	p.R10 = (chan <- <- chan chan int)(nil)
	p.R11 = (chan <- chan <- chan int)(nil)
	p.R12 = (chan chan <- <- chan int)(nil)
	p.R13 = (chan chan <- chan <- int)(nil)

}