Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
4.0.17
-
None
-
None
Description
Java permits type witnesses as part of a method reference to provide the usual hinting:
Optional<List<Number>> foo = Optional.of(42).map(List::<Number>of);
The Groovy grammar as of 4.0.17 does not support type witnesses in this position, but there are a number of cases where the compiler (particularly the STC) has limitations with type inference and it would be helpful to have.