Skip to content

Commit 3eea437

Browse files
Rewrite mutable.{Map, Set}.+ corner case
1 parent 96e9551 commit 3eea437

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

scalafix/input/src/main/scala/fix/MutSetMapSrc.scala

+1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ import scala.collection.mutable
88
class MutSetMapSrc(map: mutable.Map[Int, Int], set: mutable.Set[Int]) {
99
set + 2
1010
map + (2 -> 3)
11+
(set + 2).size
1112
}

scalafix/output/src/main/scala/fix/MutSetMapSrc.scala

+1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ import scala.collection.mutable
88
class MutSetMapSrc(map: mutable.Map[Int, Int], set: mutable.Set[Int]) {
99
set.clone() += 2
1010
map.clone() += (2 -> 3)
11+
(set.clone() += 2).size
1112
}

0 commit comments

Comments
 (0)