Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.0.7
-
None
Description
def foo() { switch(1) { case { it > 2 }: break } }
The STC should recognize the type of the switch expression and infer that it's looking for an Integer it closure, but it checks against Object instead and won't compile without an extra Integer it ->.
Attachments
Issue Links
- is related to
-
GROOVY-6939 Calling "each" on an untyped model variable with two arguments causes doCall error
- Closed