groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Afanasiev (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (GROOVY-8240) Compilation error in @CompileStatic
Date Thu, 29 Jun 2017 13:39:00 GMT

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

Alexey Afanasiev updated GROOVY-8240:
-------------------------------------
    Comment: was deleted

(was: Created PR 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
>            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