modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/import2.dir/import3.go (about) 1 // Copyright 2010 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Test that all the types from import2.go made it 6 // intact and with the same meaning, by assigning to or using them. 7 8 package main 9 10 import "./import2" 11 12 func f3(func() func() int) 13 14 func main() { 15 p.F3(p.F1) 16 p.F3(p.F2()) 17 f3(p.F1) 18 f3(p.F2()) 19 20 p.C1 = (chan<- (chan int))(nil) 21 p.C2 = (chan (<-chan int))(nil) 22 p.C3 = (<-chan (chan int))(nil) 23 p.C4 = (chan (chan<- int))(nil) 24 25 p.C5 = (<-chan (<-chan int))(nil) 26 p.C6 = (chan<- (<-chan int))(nil) 27 p.C7 = (chan<- (chan<- int))(nil) 28 29 p.C8 = (<-chan (<-chan (chan int)))(nil) 30 p.C9 = (<-chan (chan<- (chan int)))(nil) 31 p.C10 = (chan<- (<-chan (chan int)))(nil) 32 p.C11 = (chan<- (chan<- (chan int)))(nil) 33 p.C12 = (chan (chan<- (<-chan int)))(nil) 34 p.C13 = (chan (chan<- (chan<- int)))(nil) 35 36 p.R1 = (chan <- chan int)(nil) 37 p.R3 = (<- chan chan int)(nil) 38 p.R4 = (chan chan <- int)(nil) 39 40 p.R5 = (<- chan <- chan int)(nil) 41 p.R6 = (chan <- <- chan int)(nil) 42 p.R7 = (chan <- chan <- int)(nil) 43 44 p.R8 = (<- chan <- chan chan int)(nil) 45 p.R9 = (<- chan chan <- chan int)(nil) 46 p.R10 = (chan <- <- chan chan int)(nil) 47 p.R11 = (chan <- chan <- chan int)(nil) 48 p.R12 = (chan chan <- <- chan int)(nil) 49 p.R13 = (chan chan <- chan <- int)(nil) 50 51 } 52