Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.12
-
None
Description
Consider the following:
@groovy.transform.TypeChecked void test() { (new String[]{'a','b'}).with { a, b -> } // throws MissingMethodException ['a','b'].with { a, b -> } // param count error } test()
1. STC thinks it can spread array elements across closure parameters, but this does not work.
2. STC thinks it cannot spread list elements across closure parameters, which does work (if length check is lifted).
Attachments
Attachments
Issue Links
- is related to
-
GROOVY-6939 Calling "each" on an untyped model variable with two arguments causes doCall error
- Closed
-
GROOVY-8499 Glitch with native lambda support when supplied with incorrect arity lambda
- Closed
-
GROOVY-11076 @ClosureParams for StringGroovyMethods.replaceFirst and StringGroovyMethods.replaceAll wrong
- Closed
- relates to
-
GROOVY-11135 Unable to compile: Expected type java.lang.Object for closure parameter
- Closed
-
GROOVY-11188 CompileStatic broken for transpose lists in 4.0.14 but works in 4.0.13
- Closed
-
GROOVY-11124 iterating Tuple2s loses type parameters
- Closed
-
GROOVY-11125 withIndex().collect loses type parameters
- Closed
-
GROOVY-11185 each after transpose with 2 arguments does not compile
- Closed
-
GROOVY-11090 STC: closure param type inference for tuple
- Closed
-
GROOVY-11092 STC: support coerced closure argument destructuring (for list and tuple)
- Closed