groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8240) Compilation error in @CompileStatic
Date Wed, 05 Jul 2017 00:34:00 GMT

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

ASF GitHub Bot commented on GROOVY-8240:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/groovy/pull/570


> Compilation error in @CompileStatic
> -----------------------------------
>
>                 Key: GROOVY-8240
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8240
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation
>    Affects Versions: 2.5.0-alpha-1, 2.4.12
>            Reporter: Alexey Afanasiev
>
> This should be compiled and executed normally
> {code:java}
> import groovy.transform.CompileStatic
> class Bar {
>   void vararg(boolean flag = true, Class<?>... classes) {}
> }
> @CompileStatic            
> class Foo extends Bar{
>   def test() {
>     vararg(false, Foo)
>   }
> }
> new Foo().test()
> {code}
> But the result of compilation is  
> *[Static type checking] - Cannot call Foo#vararg(java.lang.Class <java.lang.Object>[])
with arguments [boolean, java.lang.Class <Foo>]*



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

Mime
View raw message