groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GROOVY-8272) Extending trait can't execute static method
Date Thu, 31 Jan 2019 11:22:00 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-8272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul King resolved GROOVY-8272.
-------------------------------
       Resolution: Fixed
         Assignee: Paul King
    Fix Version/s: 3.0.0-alpha-5
                   2.5.6

Proposed PR merged.

> 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
>            Assignee: Paul King
>            Priority: Critical
>             Fix For: 2.5.6, 3.0.0-alpha-5
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {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
(v7.6.3#76005)

Mime
View raw message