Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
I have the following program
import java.util.function.Supplier; import java.util.PriorityQueue; class Main { static final void test() { java.util.function.Supplier<java.util.PriorityQueue<Number>> x = java.util.PriorityQueue<Number>::new; // parsing error Supplier<PriorityQueue<Number>> y = PriorityQueue<Number>::new; // no error } }
Actual behavior
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: test.groovy: 6: Unexpected input: '>::' @ line 6, column 101. ava.util.PriorityQueue<Number>::new; ^ 1 error
Expected behavior
Compile successfully
Tested against master (commit: dc54541306c937a81b8bb16fe4b023c2a7d8ccf2)
Attachments
Issue Links
- is related to
-
GROOVY-10812 Expect parse error for angle brackets on left side of dot in method call
- Open
-
GROOVY-9239 Java compatibility: consider supporting method reference with generics
- Open