Description
Java supports each of the following functional interface assignments for a variadic method like java.util.Arrays#asList.
import java.util.function.* @groovy.transform.CompileStatic void test() { Supplier<List> zero = Arrays::asList Function<Integer, List> one = Arrays::asList BiFunction<Integer, Integer, List> two = Arrays::asList }
Note: Groovy compiler only produces error for first incompatible method reference.
Attachments
Issue Links
- relates to
-
GROOVY-10653 SC: support extension or variadic method reference with instance expression
- Closed