Description
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.
val iterator = ... return new Iterator { def next() { iterator.next() // this "iterator" is not what we defined above. } }
Attachments
Issue Links
- links to