File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 2 files changed +5
-2
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
1
+ package + // error
2
+
3
+ class Foo
You can’t perform that action at this time.
0 commit comments