You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "James Kleeh (JIRA)" <ji...@apache.org> on 2017/07/29 02:53:00 UTC

[jira] [Created] (GROOVY-8272) Extending trait can't execute static method

James Kleeh created GROOVY-8272:
-----------------------------------

             Summary: Extending trait can't execute static method
                 Key: GROOVY-8272
                 URL: https://issues.apache.org/jira/browse/GROOVY-8272
             Project: Groovy
          Issue Type: Bug
          Components: Static compilation
    Affects Versions: 2.4.12
            Reporter: James Kleeh
            Priority: Critical


{code}
import groovy.transform.CompileStatic

@CompileStatic
trait Foo {
    static void go() {
    }
}

@CompileStatic
trait Bar extends Foo {
    void doIt() {
        go()
    }
}
{code}

The above code will produce the following:

{{[Static type checking] - Cannot find matching method Bar#go(). Please check if the declared type is right and if the method exists.}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)