aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-02-07 13:37:57 +0100
committerMartin Odersky <odersky@gmail.com>2013-02-07 13:37:57 +0100
commit11a3d0d2792689d4992bef6dd0887dd5e8a08cb5 (patch)
tree9f070d0499fca617248c384873ceca065b007355 /src/dotty/tools/dotc/core/Denotations.scala
parentb9fa2c9f9f4d23ab7c9935a37496f4ac2bdc5fe9 (diff)
downloaddotty-11a3d0d2792689d4992bef6dd0887dd5e8a08cb5.tar.gz
dotty-11a3d0d2792689d4992bef6dd0887dd5e8a08cb5.tar.bz2
dotty-11a3d0d2792689d4992bef6dd0887dd5e8a08cb5.zip
Replacing Symbol forwarders by two implicits from Symbol to SymDenotation/ClassDenotation. Rearrangement of SymDenotation methods
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala
index f43fe5121..2c977f4be 100644
--- a/src/dotty/tools/dotc/core/Denotations.scala
+++ b/src/dotty/tools/dotc/core/Denotations.scala
@@ -132,7 +132,7 @@ object Denotations {
def isType: Boolean
/** Is this a reference to a term symbol? */
- final def isTerm: Boolean = !isType
+ def isTerm: Boolean = !isType
/** Is this denotation overloaded? */
def isOverloaded = isInstanceOf[MultiDenotation]
@@ -253,7 +253,7 @@ object Denotations {
}
abstract class SingleDenotation extends Denotation with DenotationSet {
- final override def isType = info.isInstanceOf[TypeType]
+ override def isType = info.isInstanceOf[TypeType]
override def signature: Signature = {
def sig(tp: Type): Signature = tp match {
case tp: PolyType =>
@@ -268,9 +268,9 @@ object Denotations {
}
def derivedSingleDenotation(s: Symbol, i: Type): SingleDenotation =
- if ((s eq symbol) && (i eq info)) this else copy(s, i)
+ if ((s eq symbol) && (i eq info)) this else newLikeThis(s, i)
- protected def copy(s: Symbol, i: Type): SingleDenotation = this
+ protected def newLikeThis(s: Symbol, i: Type): SingleDenotation = this
def orElse(that: => SingleDenotation) = if (this.exists) this else that
@@ -372,14 +372,14 @@ object Denotations {
val info: Type,
initValidFor: Period) extends SingleDenotation {
validFor = initValidFor
- override protected def copy(s: Symbol, i: Type): SingleDenotation = new UniqueRefDenotation(s, i, validFor)
+ override protected def newLikeThis(s: Symbol, i: Type): SingleDenotation = new UniqueRefDenotation(s, i, validFor)
}
class JointRefDenotation(val symbol: Symbol,
val info: Type,
initValidFor: Period) extends SingleDenotation {
validFor = initValidFor
- override protected def copy(s: Symbol, i: Type): SingleDenotation = new JointRefDenotation(s, i, validFor)
+ override protected def newLikeThis(s: Symbol, i: Type): SingleDenotation = new JointRefDenotation(s, i, validFor)
}
class ErrorDenotation(implicit ctx: Context) extends SingleDenotation {