Skip to content

Commit c03e31b

Browse files
committed
Optimize PlainFile.equals
1 parent 4421092 commit c03e31b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/io/PlainFile.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class PlainFile(val givenPath: Path) extends AbstractFile {
4747

4848
override def hashCode(): Int = System.identityHashCode(absolutePath)
4949
override def equals(that: Any): Boolean = that match {
50-
case x: PlainFile => absolutePath == x.absolutePath
50+
case x: PlainFile => absolutePath `eq` x.absolutePath
5151
case _ => false
5252
}
5353

0 commit comments

Comments
 (0)