1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fmt: add support for chan types and operations (#6328)

This commit is contained in:
Uwe Krüger
2020-09-08 00:36:05 +02:00
committed by GitHub
parent 9a5b86e454
commit 5258f52497
4 changed files with 106 additions and 24 deletions

View File

@@ -5,7 +5,7 @@ const (
)
fn get_val_from_chan(ch chan i64) ?i64 {
r := <-ch?
r := <-ch ?
return r
}
@@ -33,7 +33,7 @@ fn test_channel_array_mut() {
chs[0] <- t
t = <-chs[1]
}
(&sync.Channel(chs[0])).close()
chs[0].close()
sem.wait()
assert t == 100 + num_iterations
}