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

Paul King closed GROOVY-11201.
------------------------------

> STC: assign method pointer to SAM-type
> --------------------------------------
>
>                 Key: GROOVY-11201
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11201
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Static Type Checker
>    Affects Versions: 3.0.19, 4.0.15
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 3.0.20, 4.0.16
>
>
> Consider the following:
> {code:groovy}
> import java.util.function.Consumer
> void setX(String string) { }
> Consumer<String> c = this.&setX
> {code}
> With STC enabled, the compiler states {{Closure<Void>}} cannot be assigned to 
> {{Consumre<String>}}.



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

Reply via email to