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 2021/02/12 19:33:34 UTC

[GitHub] [groovy] eric-milles opened a new pull request #1487: GROOVY-9891: return bound type for wildcard GenericsType -> ClassNode

eric-milles opened a new pull request #1487:
URL: https://github.com/apache/groovy/pull/1487


   https://issues.apache.org/jira/browse/GROOVY-9891
   
   ```groovy
   import static org.codehaus.groovy.ast.tools.GenericsUtils.*
   import org.codehaus.groovy.ast.ClassHelper
   
   def collection = ClassHelper.make(Collection.class)
   // create an instance of "Collection<? extends Number>"
   collection = collection.plainNodeReference.tap { genericsTypes = buildWildcardType(ClassHelper.Number_TYPE) }
   // create parameterized version of Collection's super interface Iterable
   def iterable = parameterizeType(collection, collection.interfaces[0])
   // expecting "Iterable<? extends Number>" but get "Iterable<?>" where ? is like Object but not quite Object
   ```
   
   This change will produce `Iterable<Number>` which matches what is produced for the pure Groovy version of the test case.


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



[GitHub] [groovy] danielsun1106 commented on pull request #1487: GROOVY-9891: return bound type for wildcard GenericsType -> ClassNode

Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1487:
URL: https://github.com/apache/groovy/pull/1487#issuecomment-778974007


   Merged. Thanks!


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



[GitHub] [groovy] danielsun1106 merged pull request #1487: GROOVY-9891: return bound type for wildcard GenericsType -> ClassNode

Posted by GitBox <gi...@apache.org>.
danielsun1106 merged pull request #1487:
URL: https://github.com/apache/groovy/pull/1487


   


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