Kousuke Saruta created SPARK-30566:
--------------------------------------
Summary: Iterator doesn't refer outer identifier named "iterator"
properly in Scala 2.13
Key: SPARK-30566
URL: https://issues.apache.org/jira/browse/SPARK-30566
Project: Spark
Issue Type: Bug
Components: Build
Affects Versions: 3.0.0
Environment: Scala 2.13
Reporter: Kousuke Saruta
As of Scala 2.13, scala.collection.Iterator has "iterator" method so if an
inner class of Iterator means to refer an outer identifier named "iterator", it
does not work as we think.
Following is an example.
{code}
val iterator = ...
return new Iterator {
def next() {
iterator.next() // this "iterator" is not what we defined above.
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]