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

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

GitHub user blindpirate opened a pull request:

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

    GROOVY-7922: Static type checking not strict enough in the presence o…

    …f ambiguous method matching
    
    
    the issue has been resolved and some refactor are done

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

    $ git pull https://github.com/blindpirate/groovy groovy7922bug

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

    https://github.com/apache/groovy/pull/422.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 #422
    
----
commit b2d84738986fc83a589e78ec205bb206318a1e4a
Author: zhangbo <zhan...@nanchao.org>
Date:   2016-09-16T00:29:11Z

    GROOVY-7922: Static type checking not strict enough in the presence of 
ambiguous method matching

----


> Static type checking not strict enough in the presence of ambiguous method 
> matching
> -----------------------------------------------------------------------------------
>
>                 Key: GROOVY-7922
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7922
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Paul King
>
> This example:
> {code}
> import groovy.transform.CompileStatic
> interface FooA {}
> interface FooB {}
> class FooAB implements FooA, FooB {}
> @CompileStatic
> class TestGroovy {
>     static void test() { println new TestGroovy().foo(new FooAB()) }
>     def foo(FooB x) { 43 }
>     def foo(FooA x) { 42 }
> }
> TestGroovy.test()
> {code}
> Should probably throw some kind of ambiguous method error during compilation 
> to match Java (and dynamic Groovy's runtime error).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to