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

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

GitHub user avafanasiev opened a pull request:

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

    GROOVY-8240: Compilation error in @CompileStatic

    I have no idea why should generated methods should have receiver as 
declared class. It causes bug https://issues.apache.org/jira/browse/GROOVY-8240

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/avafanasiev/groovy master

Alternatively you can review and apply these changes as the patch at:

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #570
    
----
commit 9a6a1f67c56d4c6541caae8908ba7b970e1ff6f8
Author: alexey.afanasiev <[email protected]>
Date:   2017-06-29T13:27:38Z

    GROOVY-8240: Compilation error in @CompileStatic

----


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

Reply via email to