From a2a5a57911bc4046e78d88b28a0c7759f3b8c595 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 1 Jul 2014 13:52:21 +0200 Subject: ThisType trees have their class as a denotation Added this case, so that .symbol on a ThisType returns the underlying class. --- src/dotty/tools/dotc/ast/Trees.scala | 1 + 1 file changed, 1 insertion(+) 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 } } -- cgit v1.2.3