diff options
author | Martin Odersky <odersky@gmail.com> | 2013-02-08 22:46:59 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-02-08 22:48:05 +0100 |
commit | e8366c0fe9b5c04ba471d9f3f572d9ea0c684fbb (patch) | |
tree | 3ee88cedc116b691244c7a10611b875f76619d50 /src/dotty/tools/dotc/core/Denotations.scala | |
parent | dc137d37524e560e89a10e2ebd2e78c818e2205e (diff) | |
download | dotty-e8366c0fe9b5c04ba471d9f3f572d9ea0c684fbb.tar.gz dotty-e8366c0fe9b5c04ba471d9f3f572d9ea0c684fbb.tar.bz2 dotty-e8366c0fe9b5c04ba471d9f3f572d9ea0c684fbb.zip |
Added new utility methods to SymDenotations and refactored creation.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 2c977f4be..d02c80956 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -355,6 +355,7 @@ object Denotations { // ------ DenotationSet ops ---------------------------------------------- + def first = this def toDenot(implicit ctx: Context) = this def containsSig(sig: Signature)(implicit ctx: Context) = signature == sig @@ -395,6 +396,7 @@ object Denotations { */ trait DenotationSet { def exists: Boolean + def first: Denotation def toDenot(implicit ctx: Context): Denotation def containsSig(sig: Signature)(implicit ctx: Context): Boolean def filterDisjoint(denots: DenotationSet)(implicit ctx: Context): DenotationSet @@ -415,6 +417,7 @@ object Denotations { else if ((s1 eq denots2) && (s2 eq denots2)) this else new DenotUnion(s1, s2) def exists = true + def first = denots1.first def toDenot(implicit ctx: Context) = denots1.toDenot & denots2.toDenot def containsSig(sig: Signature)(implicit ctx: Context) = (denots1 containsSig sig) || (denots2 containsSig sig) |