From 4b97811b4e6e0d6688c9e75fdc6fb12accc846a9 Mon Sep 17 00:00:00 2001 From: Eugene Vigdorchik Date: Mon, 18 Oct 2010 17:42:45 +0000 Subject: VirtualFile.{equals/hashCode} should be based o... VirtualFile.{equals/hashCode} should be based on the path rather than bare name --- src/compiler/scala/tools/nsc/io/VirtualFile.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/io/VirtualFile.scala b/src/compiler/scala/tools/nsc/io/VirtualFile.scala index 421e39195d..d22eaa86ae 100644 --- a/src/compiler/scala/tools/nsc/io/VirtualFile.scala +++ b/src/compiler/scala/tools/nsc/io/VirtualFile.scala @@ -31,8 +31,8 @@ class VirtualFile(val name: String, _path: String) extends AbstractFile */ def this(name: String) = this(name, name) - override def hashCode = name.## - override def equals(that: Any) = cond(that) { case x: VirtualFile => x.name == name } + override def hashCode = path.## + override def equals(that: Any) = cond(that) { case x: VirtualFile => x.path == path } //######################################################################## // Private data -- cgit v1.2.3