diff options
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 6 | ||||
-rw-r--r-- | src/dotty/tools/dotc/typer/Namer.scala | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 2214fe562..d9fa15a5f 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -1226,12 +1226,6 @@ object SymDenotations { def withModuleClass(moduleClass: => Symbol): this.type = { myModuleClassFn = () => moduleClass; this } } - trait CompleteInCreationContext extends LazyType { - def completeInCreationContext(denot: SymDenotation): Unit - final override def complete(denot: SymDenotation)(implicit ctx: Context) = - completeInCreationContext(denot) - } - val NoSymbolFn = () => NoSymbol /** A missing completer */ diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala index 4d184c17b..776d59542 100644 --- a/src/dotty/tools/dotc/typer/Namer.scala +++ b/src/dotty/tools/dotc/typer/Namer.scala @@ -350,7 +350,7 @@ class Namer { typer: Typer => } /** The completer of a symbol defined by a member def or import (except ClassSymbols) */ - class Completer(val original: Tree)(implicit ctx: Context) extends LazyType with CompleteInCreationContext { + class Completer(val original: Tree)(implicit ctx: Context) extends LazyType { protected def localContext(owner: Symbol) = ctx.fresh.withOwner(owner).withTree(original) @@ -376,7 +376,10 @@ class Namer { typer: Typer => } } - override def completeInCreationContext(denot: SymDenotation): Unit = + final override def complete(denot: SymDenotation)(implicit ctx: Context) = + completeInCreationContext(denot) + + def completeInCreationContext(denot: SymDenotation): Unit = denot.info = typeSig(denot.symbol) } |