You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/11/12 19:56:03 UTC

[GitHub] [groovy] eric-milles commented on pull request #1414: GROOVY-9803: translate generics of method reference using SAM parameters

eric-milles commented on pull request #1414:
URL: https://github.com/apache/groovy/pull/1414#issuecomment-726306330


   I don't know if the change in `applyGenericsContextToParameterClass` is the right thing to do.  I have no Java specification section to quote for how return type generics should be handled.  Java gives `Set<Integer>` for `Optional.of(123).map(Collections::singleton).get()`.  I read over [this](https://docs.oracle.com/javase/tutorial/extra/generics/morefun.html) but didn't figure any specific guidance for how `map` should work in this case.
   
   **Note:** `applyGenericsContextToParameterClass` is only used by `StaticTypeCheckingVisitor`.  I would have moved it there if not for binary backwards compatibility.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org