aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-07-01 13:52:21 +0200
committerMartin Odersky <odersky@gmail.com>2014-07-17 11:01:59 +0200
commita2a5a57911bc4046e78d88b28a0c7759f3b8c595 (patch)
treeeffc25cc359d7d73a8e3ff6a1a2e5ad91129d03b
parent2e15951a3a7e9dcb877a31ab4a9f32e428d47760 (diff)
downloaddotty-a2a5a57911bc4046e78d88b28a0c7759f3b8c595.tar.gz
dotty-a2a5a57911bc4046e78d88b28a0c7759f3b8c595.tar.bz2
dotty-a2a5a57911bc4046e78d88b28a0c7759f3b8c595.zip
ThisType trees have their class as a denotation
Added this case, so that .symbol on a ThisType returns the underlying class.
-rw-r--r--src/dotty/tools/dotc/ast/Trees.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/ast/Trees.scala b/src/dotty/tools/dotc/ast/Trees.scala
index 5d92702a2..8a36fee3a 100644
--- a/src/dotty/tools/dotc/ast/Trees.scala
+++ b/src/dotty/tools/dotc/ast/Trees.scala
@@ -361,6 +361,7 @@ object Trees {
type ThisTree[-T >: Untyped] <: DenotingTree[T]
override def denot(implicit ctx: Context) = tpe match {
case tpe: NamedType => tpe.denot
+ case ThisType(cls) => cls.denot
case _ => NoDenotation
}
}