Eric Milles created GROOVY-9673:
-----------------------------------

             Summary: GroovyCastException when using Trait.super.name = ... 
with multiple setters
                 Key: GROOVY-9673
                 URL: https://issues.apache.org/jira/browse/GROOVY-9673
             Project: Groovy
          Issue Type: Bug
            Reporter: Eric Milles


Consider the following:
{code:groovy}trait T {
  def setX(Number n) {
    println 'Number'
  }
  def setX(String s) {
    println 'String'
  }
}

class C implements T {
  void test() {
    T.super.x = 'x'
  }
}

new C().test()
{code}

"T.super.x = 'x'" should drive {{setX(String)}} but instead targets the Number 
overload and fails with GroovyCastException.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to