summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-03-15 10:23:12 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-03-15 10:23:12 +1000
commit798462e739f23bb498b72675a57e4cc331404945 (patch)
tree9e6b3cb8b3a8bbc56af05faa23e8b3905e2f48f2 /src
parent5ebae12875be19ddc98520b21d98af19b7c7b2da (diff)
parent827b6f3b1d3e96bf838ed70fdb839c6c57672758 (diff)
downloadscala-798462e739f23bb498b72675a57e4cc331404945.tar.gz
scala-798462e739f23bb498b72675a57e4cc331404945.tar.bz2
scala-798462e739f23bb498b72675a57e4cc331404945.zip
Merge pull request #5040 from adriaanm/rebase-5031
Merge 2.11.x into 2.12.x [ci: last-only]
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala85
-rw-r--r--src/intellij/scala-build.iml.SAMPLE92
-rw-r--r--src/library/scala/collection/mutable/ListMap.scala2
-rw-r--r--src/manual/scala/man1/scalac.scala51
-rw-r--r--src/scaladoc/scala/tools/nsc/doc/Settings.scala2
-rw-r--r--src/scaladoc/scala/tools/nsc/doc/html/page/Entity.scala2
6 files changed, 122 insertions, 112 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 9261d6b851..da269168ec 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1507,9 +1507,8 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
}
}
- private def transformCaseApply(tree: Tree, ifNot: => Unit) = {
+ private def isSimpleCaseApply(tree: Tree): Boolean = {
val sym = tree.symbol
-
def isClassTypeAccessible(tree: Tree): Boolean = tree match {
case TypeApply(fun, targs) =>
isClassTypeAccessible(fun)
@@ -1517,40 +1516,36 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
( // SI-4859 `CaseClass1().InnerCaseClass2()` must not be rewritten to `new InnerCaseClass2()`;
// {expr; Outer}.Inner() must not be rewritten to `new Outer.Inner()`.
treeInfo.isQualifierSafeToElide(module) &&
- // SI-5626 Classes in refinement types cannot be constructed with `new`. In this case,
- // the companion class is actually not a ClassSymbol, but a reference to an abstract type.
- module.symbol.companionClass.isClass
- )
+ // SI-5626 Classes in refinement types cannot be constructed with `new`. In this case,
+ // the companion class is actually not a ClassSymbol, but a reference to an abstract type.
+ module.symbol.companionClass.isClass
+ )
}
- val doTransform =
- sym.isSourceMethod &&
+ sym.isSourceMethod &&
sym.isCase &&
sym.name == nme.apply &&
isClassTypeAccessible(tree) &&
- !tree.tpe.resultType.typeSymbol.primaryConstructor.isLessAccessibleThan(tree.symbol)
-
- if (doTransform) {
- def loop(t: Tree): Unit = t match {
- case Ident(_) =>
- checkUndesiredProperties(t.symbol, t.pos)
- case Select(qual, _) =>
- checkUndesiredProperties(t.symbol, t.pos)
- loop(qual)
- case _ =>
- }
- tree foreach {
- case i@Ident(_) =>
- enterReference(i.pos, i.symbol) // SI-5390 need to `enterReference` for `a` in `a.B()`
- case _ =>
- }
- loop(tree)
- toConstructor(tree.pos, tree.tpe)
+ !tree.tpe.finalResultType.typeSymbol.primaryConstructor.isLessAccessibleThan(tree.symbol)
+ }
+
+ private def transformCaseApply(tree: Tree) = {
+ def loop(t: Tree): Unit = t match {
+ case Ident(_) =>
+ checkUndesiredProperties(t.symbol, t.pos)
+ case Select(qual, _) =>
+ checkUndesiredProperties(t.symbol, t.pos)
+ loop(qual)
+ case _ =>
}
- else {
- ifNot
- tree
+
+ tree foreach {
+ case i@Ident(_) =>
+ enterReference(i.pos, i.symbol) // SI-5390 need to `enterReference` for `a` in `a.B()`
+ case _ =>
}
+ loop(tree)
+ toConstructor(tree.pos, tree.tpe)
}
private def transformApply(tree: Apply): Tree = tree match {
@@ -1590,12 +1585,24 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
// term should have been eliminated by super accessors
assert(!(qual.symbol.isTrait && sym.isTerm && mix == tpnme.EMPTY), (qual.symbol, sym, mix))
- transformCaseApply(tree,
+ // Rewrite eligible calls to monomorphic case companion apply methods to the equivalent constructor call.
+ //
+ // Note: for generic case classes the rewrite needs to be handled at the enclosing `TypeApply` to transform
+ // `TypeApply(Select(C, apply), targs)` to `Select(New(C[targs]), <init>)`. In case such a `TypeApply`
+ // was deemed ineligible for transformation (e.g. the case constructor was private), the refchecks transform
+ // will recurse to this point with `Select(C, apply)`, which will have a type `[T](...)C[T]`.
+ //
+ // We don't need to perform the check on the Select node, and `!isHigherKinded will guard against this
+ // redundant (and previously buggy, SI-9546) consideration.
+ if (!tree.tpe.isHigherKinded && isSimpleCaseApply(tree)) {
+ transformCaseApply(tree)
+ } else {
qual match {
case Super(_, mix) => checkSuper(mix)
case _ =>
}
- )
+ tree
+ }
}
private def transformIf(tree: If): Tree = {
val If(cond, thenpart, elsepart) = tree
@@ -1720,7 +1727,10 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
case TypeApply(fn, args) =>
checkBounds(tree, NoPrefix, NoSymbol, fn.tpe.typeParams, args map (_.tpe))
- transformCaseApply(tree, ())
+ if (isSimpleCaseApply(tree))
+ transformCaseApply(tree)
+ else
+ tree
case x @ Apply(_, _) =>
transformApply(x)
@@ -1739,12 +1749,11 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
case Ident(name) =>
checkUndesiredProperties(sym, tree.pos)
- transformCaseApply(tree,
- if (name != nme.WILDCARD && name != tpnme.WILDCARD_STAR) {
- assert(sym != NoSymbol, "transformCaseApply: name = " + name.debugString + " tree = " + tree + " / " + tree.getClass) //debug
- enterReference(tree.pos, sym)
- }
- )
+ if (name != nme.WILDCARD && name != tpnme.WILDCARD_STAR) {
+ assert(sym != NoSymbol, "transformCaseApply: name = " + name.debugString + " tree = " + tree + " / " + tree.getClass) //debug
+ enterReference(tree.pos, sym)
+ }
+ tree
case x @ Select(_, _) =>
transformSelect(x)
diff --git a/src/intellij/scala-build.iml.SAMPLE b/src/intellij/scala-build.iml.SAMPLE
index bf722e464f..0232e9e576 100644
--- a/src/intellij/scala-build.iml.SAMPLE
+++ b/src/intellij/scala-build.iml.SAMPLE
@@ -34,32 +34,32 @@
<root url="jar://$USER_HOME$/.ivy2/cache/org.codehaus.plexus/plexus-classworlds/bundles/plexus-classworlds-2.5.2.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/biz.aQute.bnd/biz.aQute.bnd/jars/biz.aQute.bnd-2.4.1.jar!/" />
<root url="jar://$USER_HOME$/.sbt/boot/scala-2.10.5/lib/scala-library.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/sbt/jars/sbt-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main/jars/main-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/actions/jars/actions-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/classpath/jars/classpath-0.13.9.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/sbt/jars/sbt-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main/jars/main-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/actions/jars/actions-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/classpath/jars/classpath-0.13.11.jar!/" />
<root url="jar://$USER_HOME$/.sbt/boot/scala-2.10.5/lib/scala-compiler.jar!/" />
<root url="jar://$USER_HOME$/.sbt/boot/scala-2.10.5/lib/scala-reflect.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/interface/jars/interface-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/io/jars/io-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/control/jars/control-0.13.9.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/interface/jars/interface-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/io/jars/io-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/control/jars/control-0.13.11.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/launcher-interface/jars/launcher-interface-1.0.0-M1.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/completion/jars/completion-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/collections/jars/collections-0.13.9.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/completion/jars/completion-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/collections/jars/collections-0.13.11.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/jline/jline/jars/jline-2.11.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/api/jars/api-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-integration/jars/compiler-integration-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/incremental-compiler/jars/incremental-compiler-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/logging/jars/logging-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/process/jars/process-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/relation/jars/relation-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compile/jars/compile-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/classfile/jars/classfile-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/persist/jars/persist-0.13.9.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/api/jars/api-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-integration/jars/compiler-integration-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/incremental-compiler/jars/incremental-compiler-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/logging/jars/logging-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/process/jars/process-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/relation/jars/relation-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compile/jars/compile-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/classfile/jars/classfile-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/persist/jars/persist-0.13.11.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.scala-tools.sbinary/sbinary_2.10/jars/sbinary_2.10-0.4.2.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-ivy-integration/jars/compiler-ivy-integration-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/ivy/jars/ivy-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/cross/jars/cross-0.13.9.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-ivy-integration/jars/compiler-ivy-integration-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/ivy/jars/ivy-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/cross/jars/cross-0.13.11.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt.ivy/ivy/jars/ivy-2.3.0-sbt-c5d1b95fdcc1e1007740ffbecf4eb07abc51ec93.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/com.jcraft/jsch/jars/jsch-0.1.46.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/serialization_2.10/jars/serialization_2.10-0.1.1.jar!/" />
@@ -70,40 +70,40 @@
<root url="jar://$USER_HOME$/.ivy2/cache/com.thoughtworks.paranamer/paranamer/jars/paranamer-2.6.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.spire-math/jawn-parser_2.10/jars/jawn-parser_2.10-0.6.0.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.spire-math/json4s-support_2.10/jars/json4s-support_2.10-0.6.0.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/run/jars/run-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/task-system/jars/task-system-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tasks/jars/tasks-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tracking/jars/tracking-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/cache/jars/cache-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/testing/jars/testing-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-agent/jars/test-agent-0.13.9.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/run/jars/run-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/task-system/jars/task-system-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tasks/jars/tasks-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tracking/jars/tracking-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/cache/jars/cache-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/testing/jars/testing-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-agent/jars/test-agent-0.13.11.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main-settings/jars/main-settings-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/apply-macro/jars/apply-macro-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/command/jars/command-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/logic/jars/logic-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-interface/jars/compiler-interface-bin-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-interface/jars/compiler-interface-src-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/precompiled-2_8_2/jars/compiler-interface-bin-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/precompiled-2_9_2/jars/compiler-interface-bin-0.13.9.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/precompiled-2_9_3/jars/compiler-interface-bin-0.13.9.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main-settings/jars/main-settings-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/apply-macro/jars/apply-macro-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/command/jars/command-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/logic/jars/logic-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-interface/jars/compiler-interface-bin-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/compiler-interface/jars/compiler-interface-src-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/precompiled-2_8_2/jars/compiler-interface-bin-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/precompiled-2_9_2/jars/compiler-interface-bin-0.13.11.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/precompiled-2_9_3/jars/compiler-interface-bin-0.13.11.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main/srcs/main-0.13.9-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/main/srcs/main-0.13.11-sources.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang/scala-library/srcs/scala-library-2.10.5-sources.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang/scala-reflect/srcs/scala-reflect-2.10.5-sources.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.scala-lang/scala-compiler/srcs/scala-compiler-2.10.5-sources.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/actions/srcs/actions-0.13.9-sources.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/sbt/srcs/sbt-0.13.9-sources.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/run/srcs/run-0.13.9-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/actions/srcs/actions-0.13.11-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/sbt/srcs/sbt-0.13.11-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/run/srcs/run-0.13.11-sources.jar!/" />
<root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/test-interface/srcs/test-interface-1.0-sources.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/testing/srcs/testing-0.13.9-sources.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tasks/srcs/tasks-0.13.9-sources.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/ivy/srcs/ivy-0.13.9-sources.jar!/" />
- <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/completion/srcs/completion-0.13.9-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/testing/srcs/testing-0.13.11-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/tasks/srcs/tasks-0.13.11-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/ivy/srcs/ivy-0.13.11-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.ivy2/cache/org.scala-sbt/completion/srcs/completion-0.13.11-sources.jar!/" />
</SOURCES>
</library>
</orderEntry>
</component>
-</module> \ No newline at end of file
+</module>
diff --git a/src/library/scala/collection/mutable/ListMap.scala b/src/library/scala/collection/mutable/ListMap.scala
index 2ea5b1fa7c..e963af4a8a 100644
--- a/src/library/scala/collection/mutable/ListMap.scala
+++ b/src/library/scala/collection/mutable/ListMap.scala
@@ -15,7 +15,7 @@ package mutable
import generic._
import annotation.tailrec
-/** A simple mutable map backed by a list.
+/** A simple mutable map backed by a list, so it preserves insertion order.
*
* @tparam A the type of the keys contained in this list map.
* @tparam B the type of the values assigned to keys in this list map.
diff --git a/src/manual/scala/man1/scalac.scala b/src/manual/scala/man1/scalac.scala
index 811fb2d94e..6ffcccea25 100644
--- a/src/manual/scala/man1/scalac.scala
+++ b/src/manual/scala/man1/scalac.scala
@@ -5,10 +5,6 @@
package scala.man1
-/**
- * @author Stephane Micheloud
- * @version 1.0
- */
object scalac extends Command {
import _root_.scala.tools.docutil.ManPage._
@@ -77,7 +73,7 @@ object scalac extends Command {
SeqPara(
"Specify where to find user class files (on Unix-based systems " &
"a colon-separated list of paths, on Windows-based systems, a " &
- "semicolon-separate list of paths). This does not override the " &
+ "semicolon-separated list of paths). This does not override the " &
"built-in (" & Mono("\"boot\"") & ") search path.",
"The default class path is the current directory. Setting the " &
Mono("CLASSPATH") & " variable or using the " & Mono("-classpath") & " " &
@@ -153,7 +149,7 @@ object scalac extends Command {
"Specify location(s) of source files."),
Definition(
CmdOptionBound("target:", "{jvm-1.8}"),
- SeqPara(
+ SeqPara(
Mono("\"jvm-1.8\"") & " target JVM 1.8 (default)")),
Definition(
CmdOption("toolcp", Argument("path")),
@@ -193,7 +189,7 @@ object scalac extends Command {
Definition(
CmdOption("Xcheckinit"),
"Wrap field accessors to throw an exception on uninitialized access."),
- Definition(
+ Definition(
CmdOption("Xdev"),
"Enable warnings for developers working on the Scala compiler"),
Definition(
@@ -209,7 +205,7 @@ object scalac extends Command {
Definition(
CmdOption("Xfatal-warnings"),
"Fail the compilation if there are any warnings."),
- Definition(
+ Definition(
CmdOption("Xfull-lubs"),
"Retain pre 2.10 behavior of less aggressive truncation of least upper bounds."),
Definition(
@@ -221,25 +217,25 @@ object scalac extends Command {
Definition(
CmdOption("Xlint"),
"Enable recommended additional warnings."),
- Definition(
+ Definition(
CmdOption("Xlog-free-terms"),
"Print a message when reification creates a free term."),
- Definition(
+ Definition(
CmdOption("Xlog-free-types"),
"Print a message when reification resorts to generating a free type."),
- Definition(
+ Definition(
CmdOption("Xlog-implicit-conversions"),
"Print a message whenever an implicit conversion is inserted."),
Definition(
CmdOption("Xlog-implicits"),
"Show more detail on why some implicits are not applicable."),
- Definition(
+ Definition(
CmdOption("Xlog-reflective-calls"),
"Print a message when a reflective method call is generated."),
- Definition(
+ Definition(
CmdOptionBound("Xmacro-settings:", Argument("option")),
"Custom settings for macros."),
- Definition(
+ Definition(
CmdOption("Xmain-class", Argument("path")),
"Class for manifest's Main-Class entry (only useful with -d <jar>)."),
Definition(
@@ -251,7 +247,7 @@ object scalac extends Command {
Definition(
CmdOption("Xno-forwarders"),
"Do not generate static forwarders in mirror classes."),
- Definition(
+ Definition(
CmdOption("Xno-patmat-analysis"),
"Don't perform exhaustivity/unreachability analysis. Also, ignore " & MItalic("@switch") & " annotation."),
Definition(
@@ -309,16 +305,21 @@ object scalac extends Command {
Definition(
CmdOptionBound("Xsource:", Argument("version")),
"Treat compiler input as Scala source for the specified version, see SI-8126."),
- Definition(
+ Definition(
CmdOption("Xsource-reader", Argument("classname")),
"Specify a custom method for reading source files."),
- Definition(
+ Definition(
CmdOption("Xstrict-inference"),
"Don't infer known-unsound types."),
Definition(
CmdOption("Xverify"),
"Verify generic signatures in generated bytecode (asm backend only)."),
Definition(
+ CmdOptionBound("Xxml:", "{coalescing}"),
+ SeqPara(
+ "Configure XML parsing.",
+ Mono("\"coalescing\"") & " convert PCData to Text and coalesce sibling nodes (default in 2.11).")),
+ Definition(
CmdOption("Y"),
"Print a synopsis of private options.")
)
@@ -332,34 +333,34 @@ object scalac extends Command {
Definition(
MItalic("namer"),
"resolve names, attach symbols to named trees"),
- Definition(
+ Definition(
MItalic("packageobjects"),
"load package objects"),
- Definition(
+ Definition(
MItalic("typer"),
"the meat and potatoes: type the trees"),
Definition(
MItalic("patmat"),
"translate match expressions"),
- Definition(
+ Definition(
MItalic("superaccessors"),
"add super accessors in traits and nested classes"),
- Definition(
+ Definition(
MItalic("extmethods"),
"add extension methods for inline classes"),
- Definition(
+ Definition(
MItalic("pickler"),
"serialize symbol tables"),
Definition(
MItalic("refchecks"),
"reference/override checking, translate nested objects"),
- Definition(
+ Definition(
MItalic("selectiveanf"),
"ANF pre-transform for " & MItalic("@cps") & " (CPS plugin)"),
- Definition(
+ Definition(
MItalic("selectivecps"),
MItalic("@cps") & "-driven transform of selectiveanf assignments (CPS plugin)"),
- Definition(
+ Definition(
MItalic("uncurry"),
"uncurry, translate function values to anonymous classes"),
Definition(
diff --git a/src/scaladoc/scala/tools/nsc/doc/Settings.scala b/src/scaladoc/scala/tools/nsc/doc/Settings.scala
index de86acb6d6..59380dd782 100644
--- a/src/scaladoc/scala/tools/nsc/doc/Settings.scala
+++ b/src/scaladoc/scala/tools/nsc/doc/Settings.scala
@@ -48,7 +48,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_))
val docfooter = StringSetting (
"-doc-footer",
"footer",
- "A footer on every Scaladoc page, by default the EPFL/Typesafe copyright notice. Can be overridden with a custom footer.",
+ "A footer on every Scaladoc page, by default the EPFL/Lightbend copyright notice. Can be overridden with a custom footer.",
""
)
diff --git a/src/scaladoc/scala/tools/nsc/doc/html/page/Entity.scala b/src/scaladoc/scala/tools/nsc/doc/html/page/Entity.scala
index 6c8f989b8c..e45847da78 100644
--- a/src/scaladoc/scala/tools/nsc/doc/html/page/Entity.scala
+++ b/src/scaladoc/scala/tools/nsc/doc/html/page/Entity.scala
@@ -404,7 +404,7 @@ trait EntityPage extends HtmlPage {
{
if (Set("epfl", "EPFL").contains(tpl.universe.settings.docfooter.value))
- <div id="footer">Scala programming documentation. Copyright (c) 2003-2016 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div>
+ <div id="footer">Scala programming documentation. Copyright (c) 2003-2016 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://www.lightbend.com" target="_top">Lightbend</a>.</div>
else
<div id="footer"> { tpl.universe.settings.docfooter.value } </div>
}