[jira] [Created] (GROOVY-8125) Upgrading to 2.4.6 breaks

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Created] (GROOVY-8125) Upgrading to 2.4.6 breaks

JIRA jira@apache.org
Saravanan Subiramaniam created GROOVY-8125:

             Summary: Upgrading to 2.4.6 breaks
                 Key: GROOVY-8125
                 URL: https://issues.apache.org/jira/browse/GROOVY-8125
             Project: Groovy
          Issue Type: Bug
          Components: groovy-runtime
    Affects Versions: 2.4.6
            Reporter: Saravanan Subiramaniam
            Priority: Critical

We recently upgraded to Groovy 2.4.6 version and running into Ambiguous method overloading for method error when setting null value. Reproducible test case:

interface A {}

interface B extends A {}

class MyClass {
   public void setSomething(A a) { }
   public void setSomething(B b) { }

def myClass = new MyClass()
A a = null
myClass.something = a

I'm not sure if this is similar to GROOVY-7481. Could you please suggest how to resolve this issue? Thanks.

This message was sent by Atlassian JIRA