diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-01-05 00:45:50 +0300 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-01-09 08:10:47 +0100 |
commit | 055b07e4db30742e8282772d08f1c42811bab4fa (patch) | |
tree | af531e14878e5c5738f1de03cb55e78f2190b466 /src/compiler | |
parent | baef45632a2b48c0f881f11c339fb14d1c33f6c3 (diff) | |
download | scala-055b07e4db30742e8282772d08f1c42811bab4fa.tar.gz scala-055b07e4db30742e8282772d08f1c42811bab4fa.tar.bz2 scala-055b07e4db30742e8282772d08f1c42811bab4fa.zip |
parentTypes => typedParentTypes
I felt really uncomfortable having to stare at `parentTypes`, when
everyone else in Typers.scala is named typedSomething.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index af8858bd60..352090892e 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -878,7 +878,7 @@ trait Namers extends MethodSynthesis { else tpt.tpe } - val parents = typer.parentTypes(templ) map checkParent + val parents = typer.typedParentTypes(templ) map checkParent enterSelf(templ.self) diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 7851261e9c..95d7f9475d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1630,7 +1630,7 @@ trait Typers extends Modes with Adaptations with Tags { ) } - def parentTypes(templ: Template): List[Tree] = templ.parents match { + def typedParentTypes(templ: Template): List[Tree] = templ.parents match { case Nil => List(atPos(templ.pos)(TypeTree(AnyRefClass.tpe))) case first :: rest => try { @@ -1652,7 +1652,7 @@ trait Typers extends Modes with Adaptations with Tags { case ex: TypeError => // fallback in case of cyclic errors // @H none of the tests enter here but I couldn't rule it out - // upd. @E when a definitions inherits itself, we end up here + // upd. @E when a definition inherits itself, we end up here // because `typedParentType` triggers `initialize` for parent types symbols log("Type error calculating parents in template " + templ) log("Error: " + ex) @@ -1763,7 +1763,7 @@ trait Typers extends Modes with Adaptations with Tags { reenterTypeParams(cdef.tparams) val tparams1 = cdef.tparams mapConserve (typedTypeDef) val impl1 = typerReportAnyContextErrors(context.make(cdef.impl, clazz, newScope)) { - _.typedTemplate(cdef.impl, parentTypes(cdef.impl)) + _.typedTemplate(cdef.impl, typedParentTypes(cdef.impl)) } val impl2 = finishMethodSynthesis(impl1, clazz, context) if (clazz.isTrait && clazz.info.parents.nonEmpty && clazz.info.firstParent.typeSymbol == AnyClass) @@ -1803,7 +1803,7 @@ trait Typers extends Modes with Adaptations with Tags { ) val impl1 = typerReportAnyContextErrors(context.make(mdef.impl, clazz, newScope)) { _.typedTemplate(mdef.impl, { - parentTypes(mdef.impl) ++ ( + typedParentTypes(mdef.impl) ++ ( if (noSerializable) Nil else { clazz.makeSerializable() |