Skip to content

Commit 48e8f92

Browse files
committed
Avoid memoization of virtual source files with same path
1 parent c2a8dae commit 48e8f92

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ class VirtualFile(val name: String, override val path: String) extends AbstractF
3838
this.content = content
3939
}
4040

41-
override def hashCode: Int = path.hashCode
42-
override def equals(that: Any): Boolean = that match {
43-
case x: VirtualFile => x.path == path
44-
case _ => false
45-
}
46-
4741
private[this] var content = Array.emptyByteArray
4842

4943
def absolute: AbstractFile = this

compiler/test-resources/repl/notFound

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ scala> Foo
22
1 | Foo
33
| ^^^
44
| Not found: Foo
5+
scala> Bar
6+
1 | Bar
7+
| ^^^
8+
| Not found: Bar

0 commit comments

Comments
 (0)