eric-milles edited a comment on pull request #1686:
URL: https://github.com/apache/groovy/pull/1686#issuecomment-1041701400


   The change for GROOVY-10484 could be separated out.  The other changes are 
to address 10176 and 9158 (which can be argued have been addressed already by 
changes in Groovy 4) and:
   ```groovy
   class C {
     C(int i, int j = 42) {
       print "$i $j"
     }
   }
   new C(i:0,j:0) // prints "0 42"
   ```
   
   I could file this as a separate issue and move the changes to a new branch.
   
   Also there is differing handling for implicit vs. explicit `@NamedParam` 
annotation:
   ```java
           Expression arg = propX(varX(map), name);
           // implicit annotation:
           Expression fallback = defaultValue == null && isPrimitiveType(type) 
? defaultValueX(type) : defaultValue;
           Expression argOrDefault = defaultValue == null && 
!isPrimitiveType(type) ? arg : ternaryX(arg, arg, fallback);
           // explicit annotation:
           Expression argOrDefault = defaultValue != null ? elvisX(arg, 
defaultValue) : arg;
   
           return asType(argOrDefault, type, coerce);
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to