You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2023/04/19 16:01:00 UTC

[jira] [Updated] (GROOVY-10984) Unexpected parser error when having fully qualified classes and constructor references

     [ https://issues.apache.org/jira/browse/GROOVY-10984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles updated GROOVY-10984:
---------------------------------
    Priority: Minor  (was: Major)

> Unexpected parser error when having fully qualified classes and constructor references
> --------------------------------------------------------------------------------------
>
>                 Key: GROOVY-10984
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10984
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser-antlr4
>            Reporter: Thodoris Sotiropoulos
>            Priority: Minor
>
> I have the following program
> {code}
> 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
>   }
> }
> {code}
> h3. Actual behavior
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> test.groovy: 6: Unexpected input: '>::' @ line 6, column 101.
>    ava.util.PriorityQueue<Number>::new;
>                                  ^
> 1 error
> {code}
> h3. Expected behavior
> Compile successfully
> Tested against master (commit: dc54541306c937a81b8bb16fe4b023c2a7d8ccf2)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)