From 8deade7d868dbd79194621d815ee6eee46f9807d Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 19 Jan 2012 11:25:19 -0800 Subject: Avoid calculating similar strings sometimes. Like when they're useless. As per suggestion from moors. Closes SI-5382. --- src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala') diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index f199195b81..faff4ccab2 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -122,6 +122,10 @@ trait Contexts { self: Analyzer => var typingIndentLevel: Int = 0 def typingIndent = " " * typingIndentLevel + def enclClassOrMethod: Context = + if ((owner eq NoSymbol) || (owner.isClass) || (owner.isMethod)) this + else outer.enclClassOrMethod + def undetparamsString = if (undetparams.isEmpty) "" else undetparams.mkString("undetparams=", ", ", "") -- cgit v1.2.3