Eric Milles created GROOVY-9672:
-----------------------------------

             Summary: trait conflict resolution not available for static methods
                 Key: GROOVY-9672
                 URL: https://issues.apache.org/jira/browse/GROOVY-9672
             Project: Groovy
          Issue Type: Bug
            Reporter: Eric Milles


If the case mentioned in 
https://docs.groovy-lang.org/latest/html/documentation/#_default_conflict_resolution
 used static methods instead of instance methods, "T.super.m()" disambiguation 
is not available.

Consider the following:
{code:groovy}
trait A {
  static m() { 'A' }
}
trait B {
  static m() { 'B' }
}
class C implements A, B {
  void test() {
    print m() // prints "B"
    print A.super.m() // java.lang.IllegalArgumentException or some other 
compiler problem
    print B.super.m() // java.lang.IllegalArgumentException or some other 
compiler problem
  }
}
new C().test()​
{code}




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

Reply via email to