[
https://issues.apache.org/jira/browse/GROOVY-8240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King closed GROOVY-8240.
-----------------------------
> 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
> Assignee: John Wagenleitner
> Priority: Major
> Fix For: 2.4.13
>
>
> 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
(v7.6.3#76005)