Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upEither documentation or implementation of PriorityQueue.iterator (and dependent functions) is incorrect #5085
Comments
This comment has been minimized.
This comment has been minimized.
Imported From: https://issues.scala-lang.org/browse/SI-5085?orig=1 |
This comment has been minimized.
This comment has been minimized.
@axel22 said (edited on Oct 18, 2011 7:37:19 AM UTC): |
scabug
closed this
Jan 8, 2013
scabug
added
the
docs
label
Apr 7, 2017
scabug
added this to the 2.10.0-M3 milestone
Apr 7, 2017
scabug
assigned
axel22
Apr 7, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
scabug commentedOct 18, 2011
The source code and documentation of scala.collections.mutable.PriorityQueue states that for .iterator and various dependent functions (notably .toList and .toString) elements are returned in priority order, which is not what the implementation actually does. Other methods, in particular the critical methods .dequeue() and .dequeueAll() behave correctly.
To reproduce:
Origin: came up via http://stackoverflow.com/questions/7792189/scala-what-is-the-most-appropriate-data-structure-for-sorted-subsets/7792837#7792837