mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 03:53:42 +00:00
compiler: implement comparing channel values
This commit is contained in:
committed by
Ron Evans
parent
c981f14e61
commit
0a40219680
Vendored
+1
-1
@@ -4,7 +4,7 @@ import "time"
|
||||
|
||||
func main() {
|
||||
ch := make(chan int)
|
||||
println("len, cap of channel:", len(ch), cap(ch))
|
||||
println("len, cap of channel:", len(ch), cap(ch), ch == nil)
|
||||
go sender(ch)
|
||||
|
||||
n, ok := <-ch
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
len, cap of channel: 0 0
|
||||
len, cap of channel: 0 0 false
|
||||
recv from open channel: 1 true
|
||||
received num: 2
|
||||
received num: 3
|
||||
|
||||
Reference in New Issue
Block a user