Paul King created GROOVY-7922:
---------------------------------
Summary: 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
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).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)