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/04/12 18:19:24 UTC

[GitHub] [groovy] eric-milles commented on pull request #1557: GROOVY-10029: SC: add toArray call for "Type[] array = collectionOfType"

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


   For reference, the ecj/javac equivalent for `String[] strings = m().toArray(new String[0]);` is:
   ```
     public static void main(java.lang.String[] args);
        0  invokestatic C.m() : java.util.List [30]
        3  iconst_0
        4  anewarray java.lang.String [18]
        7  invokeinterface java.util.List.toArray(java.lang.Object[]) : java.lang.Object[] [32] [nargs: 2]
       12  checkcast java.lang.String[] [38]
       15  astore_1 [strings]
       16  return
   ```


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