You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/02/01 23:19:06 UTC
[jira] [Closed] (GROOVY-7922) Static type checking not strict
enough in the presence of ambiguous method matching
[ https://issues.apache.org/jira/browse/GROOVY-7922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-7922.
-----------------------------
> 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
> Assignee: John Wagenleitner
> Fix For: 2.4.8
>
>
> 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.15#6346)