You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "John Wagenleitner (JIRA)" <ji...@apache.org> on 2017/07/04 22:30:03 UTC

[jira] [Updated] (GROOVY-8240) Compilation error in @CompileStatic

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

John Wagenleitner updated GROOVY-8240:
--------------------------------------
    Affects Version/s: 2.4.12

> 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)