aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-04-19 14:38:08 +0200
committerMartin Odersky <odersky@gmail.com>2013-04-19 14:40:23 +0200
commit344450ffcde551af8406fa1b873a6cb9dd430eb0 (patch)
tree81ff8fa3b076cb9f529124f340878f23ab05739f /src/dotty/tools/dotc/core/Denotations.scala
parent570282cfdb1da8098036a9974198ca65b8740c66 (diff)
downloaddotty-344450ffcde551af8406fa1b873a6cb9dd430eb0.tar.gz
dotty-344450ffcde551af8406fa1b873a6cb9dd430eb0.tar.bz2
dotty-344450ffcde551af8406fa1b873a6cb9dd430eb0.zip
Added some predefined methods in Definitions.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala
index 2d6d107f3..74140f028 100644
--- a/src/dotty/tools/dotc/core/Denotations.scala
+++ b/src/dotty/tools/dotc/core/Denotations.scala
@@ -4,7 +4,7 @@ package core
import SymDenotations.{ SymDenotation, NoDenotation }
import Contexts.{Context, ContextBase}
-import Names.Name
+import Names.{Name, PreName}
import Names.TypeName
import Symbols.NoSymbol
import Symbols._
@@ -196,6 +196,9 @@ object Denotations {
denot.symbol
}
+ def requiredMethod(name: PreName)(implicit ctx: Context): TermSymbol =
+ info.member(name.toTermName).requiredSymbol(_ is Method).asTerm
+
/** Form a denotation by conjoining with denotation `that` */
def & (that: Denotation)(implicit ctx: Context): Denotation =
if (this eq that) this