Skip to content

Commit 9144329

Browse files
committed
no postfixops in scaladoc
1 parent eea7347 commit 9144329

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

src/scaladoc/scala/tools/nsc/doc/Settings.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package scala.tools.nsc
1414
package doc
1515

1616
import java.io.File
17-
import scala.language.postfixOps
1817

1918
/** An extended version of compiler settings, with additional Scaladoc-specific options.
2019
* @param error A function that prints a string to the appropriate error stream
@@ -68,7 +67,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_))
6867

6968
lazy val uncompilableFiles = docUncompilable.value match {
7069
case "" => Nil
71-
case path => io.Directory(path).deepFiles filter (_ hasExtension "scala") toList
70+
case path => io.Directory(path).deepFiles.filter(_ hasExtension "scala").toList
7271
}
7372

7473
/** A setting that defines a URL to be concatenated with source locations and show a link to source files.
@@ -257,7 +256,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_))
257256

258257
def stripIndex(url: String): String = url.stripSuffix("index.html").stripSuffix("/") + "/"
259258

260-
lazy val extUrlMapping: Map[String, String] = docExternalDoc.value flatMap { s =>
259+
lazy val extUrlMapping: Map[String, String] = docExternalDoc.value.flatMap { s =>
261260
val idx = s.indexOf("#")
262261
if (idx > 0) {
263262
val (first, last) = s.splitAt(idx)
@@ -266,7 +265,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_))
266265
error(s"Illegal -doc-external-doc option; expected a pair with '#' separator, found: '$s'")
267266
None
268267
}
269-
} toMap
268+
}.toMap
270269

271270
/**
272271
* This is the hardcoded area of Scaladoc. This is where "undesirable" stuff gets eliminated. I know it's not pretty,

src/scaladoc/scala/tools/nsc/doc/Uncompilable.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
package scala.tools.nsc
1414
package doc
1515
import scala.language.implicitConversions
16-
import scala.language.postfixOps
1716

1817
/** Some glue between DocParser (which reads source files which can't be compiled)
1918
* and the scaladoc model.
@@ -42,7 +41,7 @@ trait Uncompilable {
4241
}
4342
def files = settings.uncompilableFiles
4443
def symbols = pairs map (_._1)
45-
def templates = symbols filter (x => x.isClass || x.isTrait || x == AnyRefClass/* which is now a type alias */) toSet
44+
def templates = symbols.filter(x => x.isClass || x.isTrait || x == AnyRefClass/* which is now a type alias */).toSet
4645
def comments = {
4746
if (settings.debug || settings.verbose)
4847
inform("Found %d uncompilable files: %s".format(files.size, files mkString ", "))

src/scaladoc/scala/tools/nsc/doc/base/CommentFactoryBase.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ import scala.annotation.tailrec
1919
import scala.collection._
2020
import scala.util.matching.Regex
2121
import scala.reflect.internal.util.Position
22-
import scala.language.postfixOps
23-
2422

2523
/** The comment parser transforms raw comment strings into `Comment` objects.
2624
* Call `parse` to run the parser. Note that the parser is stateless and

src/scaladoc/scala/tools/nsc/doc/html/page/Entity.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import model.diagram._
2222
import page.diagram._
2323

2424
import scala.collection.mutable
25-
import scala.language.postfixOps
2625
import scala.reflect.internal.Reporter
2726

2827
trait EntityPage extends HtmlPage {
@@ -166,7 +165,7 @@ trait EntityPage extends HtmlPage {
166165
)
167166

168167
val valueMembers =
169-
tpl.methods ++ tpl.values ++ tpl.templates.filter(x => x.isObject) sorted
168+
(tpl.methods ++ tpl.values ++ tpl.templates.filter(x => x.isObject)).sorted
170169

171170
val (absValueMembers, nonAbsValueMembers) =
172171
valueMembers partition (_.isAbstract)
@@ -509,7 +508,7 @@ trait EntityPage extends HtmlPage {
509508
// see ImplicitMemberShadowing trait for more information
510509
val shadowingSuggestion = {
511510
val params = mbr match {
512-
case d: Def => d.valueParams map (_ map (_ name) mkString("(", ", ", ")")) mkString
511+
case d: Def => d.valueParams.map(_.map(_.name).mkString("(", ", ", ")")).mkString
513512
case _ => "" // no parameters
514513
}
515514
Br ++ Txt("To access this member you can use a ") ++

0 commit comments

Comments
 (0)