Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-JSR-1
-
None
-
None
Description
implement isCase() on Closures like
public boolean isCase(Object candidate)
to let Closures play as switch cases like in SwitchTest
void testSwitchWithClosure(){
switch(0){
case
: break
default: assert false
}
switch(0){
case
: assert false
}
switch(0){
case
: break
default: assert false
}
switch(0){
case
: break
default: assert false
}
}
That way, we can switch on logic.