Skip to content

Commit

Permalink
Merge pull request #10221 from liang3zy22/collectionbug12369
Browse files Browse the repository at this point in the history
new LinkedHashMap/LinkedHashSet implementation
  • Loading branch information
lrytz committed Dec 2, 2022
2 parents d120dd8 + d07b344 commit 13a2976
Show file tree
Hide file tree
Showing 8 changed files with 691 additions and 158 deletions.
1 change: 1 addition & 0 deletions src/interactive/scala/tools/nsc/interactive/Global.scala
Expand Up @@ -995,6 +995,7 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
respond(response) { scopeMemberFlatten(scopeMembers(pos)) }
}

@nowarn("msg=inheritance from class LinkedHashMap")
private class Members[M <: Member] extends LinkedHashMap[Name, Set[M]] {
override def default(key: Name) = Set()

Expand Down
4 changes: 2 additions & 2 deletions src/library/scala/collection/mutable/HashTable.scala
Expand Up @@ -35,8 +35,8 @@ import java.lang.Integer
*
* @tparam A type of the elements contained in this hash table.
*/
// Was an abstract class, but to simplify the upgrade of the parallel collections I’ve made it a trait
private[collection] /*abstract class*/ trait HashTable[A, B, Entry >: Null <: HashEntry[A, Entry]] extends HashTable.HashUtils[A] {
// Not used in the standard library, but used in scala-parallel-collections
private[collection] trait HashTable[A, B, Entry >: Null <: HashEntry[A, Entry]] extends HashTable.HashUtils[A] {
// Replacing Entry type parameter by abstract type member here allows to not expose to public
// implementation-specific entry classes such as `DefaultEntry` or `LinkedEntry`.
// However, I'm afraid it's too late now for such breaking change.
Expand Down

0 comments on commit 13a2976

Please sign in to comment.