mvmn commented on issue #910: GROOVY-9083: groovyConsole should be updated to 
understand method ref…
URL: https://github.com/apache/groovy/pull/910#issuecomment-511587368
 
 
   Why doesn't this work in Groovy Shell though?
   
   ```
   > 
[1,2,3].stream().map(String::valueOf).collect(java.util.stream.Collectors.toList())
   groovysh_parse: 2: unexpected token: : @ line 2, column 29.
      
[1,2,3].stream().map(String::valueOf).collect(java.util.stream.Collectors.toList())
                                  ^
   > 
[1,2,3].stream().map(v->String.valueOf(v)).collect(java.util.stream.Collectors.toList())
   groovysh_parse: 2: unexpected token: -> @ line 2, column 23.
      
[1,2,3].stream().map(v->String.valueOf(v)).collect(java.util.stream.Collectors.toList())
                            ^
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to