Skip to content

Commit 67ba9b5

Browse files
committed
Drop redundant calls to stripReadOnly
1 parent 0a0e666 commit 67ba9b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/cc/SepCheck.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ object SepCheck:
180180
case newElem :: newElems1 =>
181181
if seen.contains(newElem) then
182182
recur(seen, acc, newElems1)
183-
else newElem.stripRestricted.stripReadOnly match
183+
else newElem.stripRestricted match
184184
case _: FreshCap if !newElem.isKnownClassifiedAs(defn.Caps_SharedCapability) =>
185185
val hiddens = if followHidden then newElem.hiddenSet.toList else Nil
186186
recur(seen + newElem, acc + newElem, hiddens ++ newElems1)
@@ -220,7 +220,7 @@ object SepCheck:
220220
refs1.foreach: ref =>
221221
if !ref.isReadOnly then
222222
val coreRef = ref.stripRestricted
223-
if refs2.exists(_.stripRestricted.stripReadOnly.coversFresh(coreRef)) then
223+
if refs2.exists(_.stripRestricted.coversFresh(coreRef)) then
224224
acc += coreRef
225225
acc
226226
assert(refs.forall(_.isTerminalCapability))

0 commit comments

Comments
 (0)