Skip to content

Commit 0bdc468

Browse files
committed
Delete Suppression.matches(suppression)
1 parent 0d99c7a commit 0bdc468

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

compiler/src/dotty/tools/dotc/reporting/WConf.scala

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -151,30 +151,6 @@ class Suppression(val annotPos: SourcePosition, val filters: List[MessageFilter]
151151
def matches(dia: Diagnostic): Boolean =
152152
val pos = dia.pos
153153
pos.exists && start <= pos.start && pos.end <= end && filters.forall(_.matches(dia))
154-
def matches(other: Suppression): Boolean =
155-
start == other.start
156-
&& end == other.end
157-
&& verbose == other.verbose
158-
&& filters.lengthCompare(other.filters) == 0
159-
&& filters.forall(other.hasFilter)
160-
&& other.filters.forall(hasFilter)
161-
162-
private def hasFilter(filter: MessageFilter): Boolean =
163-
import MessageFilter.*
164-
filters.exists:
165-
case MessageID(errorId) =>
166-
cond(filter):
167-
case MessageID(otherId) => errorId == otherId
168-
case MessagePattern(pattern) =>
169-
cond(filter):
170-
case MessagePattern(otherPattern) => pattern.toString == otherPattern.toString
171-
case SourcePattern(pattern) =>
172-
cond(filter):
173-
case SourcePattern(otherPattern) => pattern.toString == otherPattern.toString
174-
case Origin(pattern) =>
175-
cond(filter):
176-
case Origin(otherPattern) => pattern.toString == otherPattern.toString
177-
case x => x == filter // Any, Deprecated, Feature, Unchecked, None
178154

179155
override def toString = s"Suppress in ${annotPos.source} $start..$end [${filters.mkString(", ")}]"
180156
end Suppression

0 commit comments

Comments
 (0)