File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ object Trees {
233
233
/** Tree's denotation can be derived from its type */
234
234
abstract class DenotingTree [- T >: Untyped ] extends Tree [T ] {
235
235
type ThisTree [- T >: Untyped ] <: DenotingTree [T ]
236
- override def denot (implicit ctx : Context ) = tpe match {
236
+ override def denot (implicit ctx : Context ) = typeOpt match {
237
237
case tpe : NamedType => tpe.denot
238
238
case tpe : ThisType => tpe.cls.denot
239
239
case tpe : AnnotatedType => tpe.stripAnnots match {
@@ -363,7 +363,7 @@ object Trees {
363
363
type ThisTree [- T >: Untyped ] = This [T ]
364
364
// Denotation of a This tree is always the underlying class; needs correction for modules.
365
365
override def denot (implicit ctx : Context ): Denotation = {
366
- tpe match {
366
+ typeOpt match {
367
367
case tpe @ TermRef (pre, _) if tpe.symbol is Module =>
368
368
tpe.symbol.moduleClass.denot.asSeenFrom(pre)
369
369
case _ =>
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class FrontEnd extends Phase {
70
70
private def firstTopLevelDef (trees : List [tpd.Tree ])(implicit ctx : Context ): Symbol = trees match {
71
71
case PackageDef (_, defs) :: _ => firstTopLevelDef(defs)
72
72
case Import (_, _) :: defs => firstTopLevelDef(defs)
73
- case (tree @ TypeDef (_, _)) :: _ => if ( tree.hasType) tree. symbol else NoSymbol
73
+ case (tree @ TypeDef (_, _)) :: _ => tree.symbol
74
74
case _ => NoSymbol
75
75
}
76
76
You can’t perform that action at this time.
0 commit comments