aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Names.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-05-06 19:27:44 +0200
committerMartin Odersky <odersky@gmail.com>2016-05-23 16:11:45 +0200
commita88de62e5d60fe8ba83d99bd463797e6b173e3d1 (patch)
treeac00eace9d22fde844eab1931cdb1896d35e36ff /src/dotty/tools/dotc/core/Names.scala
parentec71e006ea5d506b55ba624999b0d2aa01b2d7c1 (diff)
downloaddotty-a88de62e5d60fe8ba83d99bd463797e6b173e3d1.tar.gz
dotty-a88de62e5d60fe8ba83d99bd463797e6b173e3d1.tar.bz2
dotty-a88de62e5d60fe8ba83d99bd463797e6b173e3d1.zip
Safe equality for core classes:
Name, Symbol, Denotation, Type. This uncovered two nonsensical comparisons, one in CollectEntryPoints, the other in DottyBackendInterface.
Diffstat (limited to 'src/dotty/tools/dotc/core/Names.scala')
-rw-r--r--src/dotty/tools/dotc/core/Names.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Names.scala b/src/dotty/tools/dotc/core/Names.scala
index 10eef16c1..223d95045 100644
--- a/src/dotty/tools/dotc/core/Names.scala
+++ b/src/dotty/tools/dotc/core/Names.scala
@@ -26,6 +26,8 @@ object Names {
def toTermName: TermName
}
+ implicit def eqName: Eq[Name, Name] = Eq
+
/** A name is essentially a string, with three differences
* 1. Names belong in one of two name spaces: they are type names or term names.
* Term names have a sub-category of "local" field names.