sreich
02/26/2017, 12:55 PMwhen (foo) { != 0 -> stuff(); else -> blah() }
, while still using the var specifier, aka the (foo)
bernhard
02/26/2017, 1:10 PMsreich
02/26/2017, 1:11 PMbernhard
02/26/2017, 1:12 PM!in 0..0
Andreas Sinz
02/26/2017, 1:24 PMvar foo
inside when?sreich
02/26/2017, 3:05 PMbernhard
02/26/2017, 4:17 PMwhen (foo) {
5 -> onlyWhenFive()
foo != 0 -> stuff()
else -> blah()
}
sreich
02/26/2017, 4:29 PMbernhard
02/26/2017, 4:51 PMin
and is
!in 0..0
where you create a range for [0]groostav
02/26/2017, 10:46 PMwhen {
foo == 5 -> onlyWhenFive()
foo != 0 -> stuff()
else -> blah()
}
so the thing we're trying to eliminate here is a couple of extra foo
_expr_'s.
I could've sworn there were some issues for this but I cant find them now