import time

struct St {
	a int
}

fn f1_good(ch1 chan St, ch2 chan int, ch3 chan int) {
	mut a := 5
	select {
		a = <- ch3 {
			println(a)
		}
		b := <- ch1 {
			println(b.a)
		}
		ch1 <- a {
			a++
		}
		> 50 * time.millisecond {
			println('timeout')
		}
	}
	println('done')
}

fn f2_good(ch1 chan St) {
	select {
		b := <- ch1 {
			println(b)
		}
		else {
			println('no channel ready')
		}
	}
}

fn f3_bad(ch1 chan St) {
	select {
		b := 17 {
			println(b)
		}
	}
}

fn main() {}

			
