Skip to content
This repository
Browse code

parentTypes => typedParentTypes

I felt really uncomfortable having to stare at `parentTypes`, when
everyone else in Typers.scala is named typedSomething.
  • Loading branch information...
commit 055b07e4db30742e8282772d08f1c42811bab4fa 1 parent baef456
Eugene Burmako authored
2  src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -878,7 +878,7 @@ trait Namers extends MethodSynthesis {
878 878
         else tpt.tpe
879 879
       }
880 880
 
881  
-      val parents = typer.parentTypes(templ) map checkParent
  881
+      val parents = typer.typedParentTypes(templ) map checkParent
882 882
 
883 883
       enterSelf(templ.self)
884 884
 
8  src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1630,7 +1630,7 @@ trait Typers extends Modes with Adaptations with Tags {
1630 1630
         )
1631 1631
     }
1632 1632
 
1633  
-    def parentTypes(templ: Template): List[Tree] = templ.parents match {
  1633
+    def typedParentTypes(templ: Template): List[Tree] = templ.parents match {
1634 1634
       case Nil => List(atPos(templ.pos)(TypeTree(AnyRefClass.tpe)))
1635 1635
       case first :: rest =>
1636 1636
         try {
@@ -1652,7 +1652,7 @@ trait Typers extends Modes with Adaptations with Tags {
1652 1652
           case ex: TypeError =>
1653 1653
             // fallback in case of cyclic errors
1654 1654
             // @H none of the tests enter here but I couldn't rule it out
1655  
-            // upd. @E when a definitions inherits itself, we end up here
  1655
+            // upd. @E when a definition inherits itself, we end up here
1656 1656
             // because `typedParentType` triggers `initialize` for parent types symbols
1657 1657
             log("Type error calculating parents in template " + templ)
1658 1658
             log("Error: " + ex)
@@ -1763,7 +1763,7 @@ trait Typers extends Modes with Adaptations with Tags {
1763 1763
       reenterTypeParams(cdef.tparams)
1764 1764
       val tparams1 = cdef.tparams mapConserve (typedTypeDef)
1765 1765
       val impl1 = typerReportAnyContextErrors(context.make(cdef.impl, clazz, newScope)) {
1766  
-        _.typedTemplate(cdef.impl, parentTypes(cdef.impl))
  1766
+        _.typedTemplate(cdef.impl, typedParentTypes(cdef.impl))
1767 1767
       }
1768 1768
       val impl2 = finishMethodSynthesis(impl1, clazz, context)
1769 1769
       if (clazz.isTrait && clazz.info.parents.nonEmpty && clazz.info.firstParent.typeSymbol == AnyClass)
@@ -1803,7 +1803,7 @@ trait Typers extends Modes with Adaptations with Tags {
1803 1803
       )
1804 1804
       val impl1 = typerReportAnyContextErrors(context.make(mdef.impl, clazz, newScope)) {
1805 1805
         _.typedTemplate(mdef.impl, {
1806  
-          parentTypes(mdef.impl) ++ (
  1806
+          typedParentTypes(mdef.impl) ++ (
1807 1807
             if (noSerializable) Nil
1808 1808
             else {
1809 1809
               clazz.makeSerializable()
2  src/reflect/scala/reflect/internal/Symbols.scala
@@ -2232,7 +2232,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
2232 2232
     private case class SymbolKind(accurate: String, sanitized: String, abbreviation: String)
2233 2233
     private def symbolKind: SymbolKind = {
2234 2234
       var kind =
2235  
-        if (isTermMacro) ("macro method", "macro method", "MAC")
  2235
+        if (isTermMacro) ("term macro", "macro method", "MACM")
2236 2236
         else if (isInstanceOf[FreeTermSymbol]) ("free term", "free term", "FTE")
2237 2237
         else if (isInstanceOf[FreeTypeSymbol]) ("free type", "free type", "FTY")
2238 2238
         else if (isPackage) ("package", "package", "PK")

0 notes on commit 055b07e

Please sign in to comment.
Something went wrong with that request. Please try again.