groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Kleeh (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GROOVY-8272) Extending trait can't execute static method
Date Sat, 29 Jul 2017 02:53:00 GMT
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)

Mime
View raw message