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

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

codecov-commenter commented on PR #3382:
URL: https://github.com/apache/groovy/pull/3382#issuecomment-7296347715

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3382?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 75.2933%. Comparing base 
([`494d161`](https://app.codecov.io/gh/apache/groovy/commit/494d161bb13d832e65136174312ea6609867d869?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`feb6538`](https://app.codecov.io/gh/apache/groovy/commit/feb65389477234ef02ce80d5b7f7b59b269ca155?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/3382/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/3382?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3382        +/-   ##
   ==================================================
   + Coverage     75.2860%   75.2933%   +0.0073%     
   - Complexity      49967      49977        +10     
   ==================================================
     Files            1775       1775                
     Lines          163660     163668         +8     
     Branches        32301      32301                
   ==================================================
   + Hits           123213     123231        +18     
   + Misses          28947      28941         -6     
   + Partials        11500      11496         -4     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3382?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...rm/sc/transformers/ConstructorCallTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3382?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FConstructorCallTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQ29uc3RydWN0b3JDYWxsVHJhbnNmb3JtZXIuamF2YQ==)
 | `94.3262% <100.0000%> (+0.2964%)` | :arrow_up: |
   
   ... and [14 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3382/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> "Target constructor for constructor call expression hasn't been set" when 
> using map-constructor-call with method-returned map under static compilation
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12454
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12454
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.5.23, 3.0.25, 5.0.3, 4.0.33, 5.1.3, 6.0.0
>            Reporter: Björn Kautler
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 4.0.34, 7.0.0-alpha-1, 5.1.4, 6.0.1
>
>
> Given the snippet
> {code:groovy}
> class Person2 {
>   def name
>   def age
> }
> def <T> T record(T value) {
>   value
> }
> Map recordMap(Map value) {
>   value
> }
> @groovy.transform.CompileStatic
> def foo() {
>   [
>     new Person2(record([name: 'fred', age: 25])),
>     new Person2([name: 'fred', age: 25]),
>     new Person2(recordMap([name: 'fred', age: 25]))
>   ]
> }
> foo() {code}
>  
> With the {{CompileStatic}} line commented out, all versions mentioned as 
> affected compile fine and run fine, returning a list with three identical 
> person instances with the properties set.
> With the snippet as given, none of the versions can compile the snippet due 
> to the first and last constructor lines.
> Except of 3.0.25 all versions tell for both lines "Target constructor for 
> constructor call expression hasn't been set".
> 3.0.25 shows the same for the first one, and "Cannot find matching method 
> Person2#<init>(java.util.Map). Please check if the declared type is correct 
> and if the method exists." for the last one.
> With {{TypeChecked}} instead of {{CompileStatic}} it also works fine in all 
> versions except 3.0.25. 3.0.25 with only type-checke can compile the first 
> line but still has the same error for the last line.z
>  
> So it seems the SC does not properly use the "map-constructor-call" semantics 
> if a normal or generic method call returned type {{{}Map{}}}, plus 3.0.25 
> having some additional problem.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to