You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/01/31 11:22:00 UTC

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

    [ https://issues.apache.org/jira/browse/GROOVY-8272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16757143#comment-16757143 ] 

Paul King edited comment on GROOVY-8272 at 1/31/19 11:21 AM:
-------------------------------------------------------------

Proposed PR merged. Thanks for reporting the issue.


was (Author: paulk):
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)