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