[ 
https://issues.apache.org/jira/browse/GROOVY-8917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16715376#comment-16715376
 ] 

ASF GitHub Bot commented on GROOVY-8917:
----------------------------------------

GitHub user danielsun1106 opened a pull request:

    https://github.com/apache/groovy/pull/837

    GROOVY-8917: Failed to infer parameter type of some SAM, e.g. BinaryO…

    …perator

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/danielsun1106/groovy refine-type-inference

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/837.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #837
    
----
commit 3669f04205265b62e3a3f339aa1b81fbf3003ecb
Author: danielsun1106 <realbluesun@...>
Date:   2018-12-10T19:06:29Z

    GROOVY-8917: Failed to infer parameter type of some SAM, e.g. BinaryOperator

----


> Failed to infer parameter type of some SAM, e.g. BinaryOperator
> ---------------------------------------------------------------
>
>                 Key: GROOVY-8917
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8917
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Daniel Sun
>            Assignee: Daniel Sun
>            Priority: Major
>
> {code:java}
>         import groovy.transform.CompileStatic
>         import java.util.stream.Collectors
>         import java.util.stream.Stream
>         
>         @CompileStatic
>         public class Test1 {
>             public static void main(String[] args) {
>                 p();
>             }
>             
>             public static void p() {
>                 // If we do not explicitly declare the type of parameter, STC 
> fails
>                 assert 13 == [1, 2, 3].stream().reduce(7, (Integer r, Integer 
> e) -> r + e);
>             }
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to