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:
[email protected]


Reply via email to