aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-03 14:21:33 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-03 14:21:33 +0100
commitfd5e45bd71c972fddc0f835cdb011beb76a77770 (patch)
tree619ca441a99605f228add3667ae18d04d463d626 /src/dotty/tools/dotc/typer/Namer.scala
parent2d500b7746a38647c7a97db99207ca4972cd49eb (diff)
downloaddotty-fd5e45bd71c972fddc0f835cdb011beb76a77770.tar.gz
dotty-fd5e45bd71c972fddc0f835cdb011beb76a77770.tar.bz2
dotty-fd5e45bd71c972fddc0f835cdb011beb76a77770.zip
Making printing configurable.
Special by-topic printers that can be turned off.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index 16e965823..97114d410 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -14,6 +14,7 @@ import collection.mutable
import annotation.tailrec
import ErrorReporting._
import tpd.ListOfTreeDecorator
+import config.Printers._
import language.implicitConversions
trait NamerContextOps { this: Context =>
@@ -180,7 +181,7 @@ class Namer { typer: Typer =>
}
else completer
- println(i"creating symbol for $tree")
+ typr.println(i"creating symbol for $tree")
tree match {
case tree: TypeDef if tree.isClassDef =>
val cls = record(ctx.newClassSymbol(
@@ -209,7 +210,7 @@ class Namer { typer: Typer =>
*/
def enterSymbol(sym: Symbol)(implicit ctx: Context) = {
if (sym.exists) {
- println(s"entered: $sym in ${ctx.owner} and ${ctx.effectiveScope}")
+ typr.println(s"entered: $sym in ${ctx.owner} and ${ctx.effectiveScope}")
def preExisting = ctx.effectiveScope.lookup(sym.name)
if (sym.owner is PackageClass) {
if (preExisting.isDefinedInCurrentRun)
@@ -238,7 +239,7 @@ class Namer { typer: Typer =>
def expand(tree: Tree)(implicit ctx: Context): Unit = tree match {
case mdef: DefTree =>
val expanded = desugar.defTree(mdef)
- println(i"Expansion: $mdef expands to $expanded")
+ typr.println(i"Expansion: $mdef expands to $expanded")
if (expanded ne mdef) expandedTree(mdef) = expanded
case _ =>
}