diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 1f8f13ae02..60641d6752 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -267,10 +267,6 @@ trait Contexts { self: Analyzer => /** Saved type bounds for type parameters which are narrowed in a GADT. */ var savedTypeBounds: List[(Symbol, Type)] = List() - /** Indentation level, in columns, for output under -Ytyper-debug */ - var typingIndentLevel: Int = 0 - def typingIndent = " " * typingIndentLevel - /** The next enclosing context (potentially `this`) that is owned by a class or method */ def enclClassOrMethod: Context = if ((owner eq NoSymbol) || (owner.isClass) || (owner.isMethod)) this @@ -282,6 +278,11 @@ trait Contexts { self: Analyzer => /** ...or an Apply. */ def enclosingApply = nextEnclosing(_.tree.isInstanceOf[Apply]) + def siteString = { + def what_s = if (owner.isConstructor) "" else owner.kindString + def where_s = if (owner.isClass) "" else "in " + enclClass.owner.decodedName + List(what_s, owner.decodedName, where_s) filterNot (_ == "") mkString " " + } // // Tracking undetermined type parameters for type argument inference. // @@ -445,7 +446,6 @@ trait Contexts { self: Analyzer => // Fields that are directly propagated c.variance = variance c.diagnostic = diagnostic - c.typingIndentLevel = typingIndentLevel c.openImplicits = openImplicits c.contextMode = contextMode // note: ConstructorSuffix, a bit within `mode`, is conditionally overwritten below. c._reportBuffer = reportBuffer |