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

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

sonarqubecloud[bot] commented on PR #2851:
URL: https://github.com/apache/groovy/pull/2851#issuecomment-5495401563

   ## [![Quality Gate 
Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png
 'Quality Gate 
Passed')](https://sonarcloud.io/dashboard?id=apache_groovy&pullRequest=2851) 
**Quality Gate passed**  
   Issues  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 New 
issues](https://sonarcloud.io/project/issues?id=apache_groovy&pullRequest=2851&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png
 '') [0 Accepted 
issues](https://sonarcloud.io/project/issues?id=apache_groovy&pullRequest=2851&issueStatuses=ACCEPTED)
   
   Measures  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_groovy&pullRequest=2851&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [100.0% Coverage on New 
Code](https://sonarcloud.io/component_measures?id=apache_groovy&pullRequest=2851&metric=new_coverage&view=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0.0% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_groovy&pullRequest=2851&metric=new_duplicated_lines_density&view=list)
  
     
   <!

> Closure calls with Object[] parameter under static compilation get the wrong 
> argument
> -------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12309
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12309
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 6.0.0-alpha-1, 5.0.3, 4.0.31
>            Reporter: Björn Kautler
>            Assignee: Jochen Theodorou
>            Priority: Major
>
> With
> {code:java}
> class Foo {
>   def foo() {
>     { Object[] foo -> println(foo) }.call(new Object[] { 'foo' })
>   }
> }
> new Foo().foo() {code}
> you get {{[foo]}} printed.
> Adding {{@groovy.transform.CompileStatic}} it prints {{{}[[foo]]{}}}.
> Removing the {{Object[]}} with added static-compilation it again prints 
> {{{}[foo]{}}}.
> The closure under static compilation should get the same parameter and not 
> wrapped in another {{{}Object[]{}}}.
> This is caused by the {{call}} / {{doCall}} methods generated for the closure.
> The {{call}} call where it happens in production is a precompiled Java code 
> that gives the same argument in either case.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to