build: separate compiler and libs
This commit is contained in:
19
compiler/cl/_testgo/chan/in.go
Normal file
19
compiler/cl/_testgo/chan/in.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
ch := make(chan int, 10)
|
||||
var v any = ch
|
||||
println(ch, len(ch), cap(ch), v)
|
||||
go func() {
|
||||
ch <- 100
|
||||
}()
|
||||
n := <-ch
|
||||
println(n)
|
||||
|
||||
ch2 := make(chan int, 10)
|
||||
go func() {
|
||||
close(ch2)
|
||||
}()
|
||||
n2, ok := <-ch2
|
||||
println(n2, ok)
|
||||
}
|
||||
Reference in New Issue
Block a user