eric-milles opened a new pull request, #1756:
URL: https://github.com/apache/groovy/pull/1756
Support multi-assign for `Stream` and `Iterator`. Improve efficiency of
multi-assign for types like `Set` and `Collection` which do not support direct
indexing.
Translate "def (one,two) = rhs" into (pseudo-code):
```groovy
def iter = rhs.iterator(), first
if (iter.hasNext() && (first = iter.next()) !== rhs) {
def one = first
def two = iter.hasNext() ? iter.next() : null
} else {
def one = rhs.getAt(0)
def two = rhs.getAt(1)
}
```
https://issues.apache.org/jira/browse/GROOVY-10666
https://issues.apache.org/jira/browse/GROOVY-5744
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]