anko icon indicating copy to clipboard operation
anko copied to clipboard

Select statement

Open alaingilbert opened this issue 5 years ago • 2 comments

Add select to the language

examples:

a = make(chan int64, 1)
select {
    case <-a:
        println("value received on a")
    default:
        println("default")
}
a = make(chan int64, 1)
b = make(chan int64, 1)
b <- 2
val = 0
select {
    case val = <-a:
        println("value " + val + " received on a")
    case val = <-b:
        println("value " + val + " received on b")
}

alaingilbert avatar Mar 02 '20 03:03 alaingilbert

Codecov Report

Merging #325 into master will increase coverage by 0.28%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #325      +/-   ##
=========================================
+ Coverage   87.42%   87.7%   +0.28%     
=========================================
  Files          15      15              
  Lines        2663    2742      +79     
=========================================
+ Hits         2328    2405      +77     
- Misses        216     217       +1     
- Partials      119     120       +1
Impacted Files Coverage Δ
vm/vmStmt.go 96.69% <100%> (+0.49%) :arrow_up:
vm/vm.go 85.84% <0%> (-0.89%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5f413ab...57d52a5. Read the comment docs.

codecov-io avatar Mar 02 '20 03:03 codecov-io

Any chance this gets merged?

brutella avatar Mar 31 '21 09:03 brutella