diff options
author | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2010-10-18 17:42:45 +0000 |
---|---|---|
committer | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2010-10-18 17:42:45 +0000 |
commit | 4b97811b4e6e0d6688c9e75fdc6fb12accc846a9 (patch) | |
tree | d6bc22be6c8068af6e66b6aba41cd62574778716 | |
parent | 8dd7839ac882d42a130dfee91d4b8507ef332782 (diff) | |
download | scala-4b97811b4e6e0d6688c9e75fdc6fb12accc846a9.tar.gz scala-4b97811b4e6e0d6688c9e75fdc6fb12accc846a9.tar.bz2 scala-4b97811b4e6e0d6688c9e75fdc6fb12accc846a9.zip |
VirtualFile.{equals/hashCode} should be based o...
VirtualFile.{equals/hashCode} should be based on the path rather than bare name
-rw-r--r-- | src/compiler/scala/tools/nsc/io/VirtualFile.scala | 4 |
1 files changed, 2 insertions, 2 deletions
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 |