Sign in
apache
/
groovy
/
0b4cb8487bd3da9b9af5d15d0c5bc311b618ad96
/
.
/
groovy
/
modules
/
classic
/
src
/
test
/
groovy
/
bugs
/
Groovy389_Bug.groovy
blob: 319562b5666d9e1034c3e3eef79e02f7682d3ef9 [
file
] [
log
] [
blame
]
/**
* Verifies that closures work inside case blocks.
*
*/
class
Groovy389_Bug
extends
GroovyTestCase
{
void
testBug
()
{
a
=
[
10
,
11
,
12
]
b
=
0
switch
(
"list"
)
{
case
"list"
:
a
.
each
{
b
=
b
+
1
}
break
}
assert
b
==
3
}
}