jdaugherty commented on PR #3081:
URL: https://github.com/apache/groovy/pull/3081#issuecomment-6929726971

   Thanks Paul, and for the bisect. I reproduced both tables: with 4.0.33 
compiled together, `base.name = 'x'` calls `Impl.setName` but 
`setName`/`getName` call `Named`; with this PR, `h(i.getName())` picks 
`h(String)` and, for a `Holder<Number>` with an `Integer value` property, 
`n(hi.getValue())` picks `n(Integer)`.
   
   78abaf5c76 adds:
   
   - A Groovy 7 entry in `COMPATIBILITY.md` with the three points: the 
assignment form calling the class's setter again (a regression since 5.0.0 from 
GROOVY-11381), the explicit calls preferring the class's accessor, and the 
narrower inferred type and overload where the interface declares a wider type.
   - `testAccessorOfPropertyNarrowerThanInterfaceMethod` in `Groovy12552`, 
asserting the overloads chosen for `i.getName()` and `i.name`, and for the 
`Holder<Number>` case, and that `i.getName().toUpperCase()` type checks. 
Without the fix it fails to compile.
   
   I've corrected the PR description and GROOVY-12552, and added 4.0.33 and 
6.0.0 to its affected versions.
   
   6.0.x only sounds right, so I've dropped the 5.1.x request from the 
description. Thanks for opening GROOVY-12760.
   


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