summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2016-09-07 14:17:35 -0700
committerSeth Tisue <seth@tisue.net>2016-10-24 17:45:52 -0700
commite0a8ffe88740995150fa7ca58797a4cceed3169f (patch)
tree79e2dade4a231364d2aedc8e8f8f0d0b034a87c4
parent501c21260cff006e7cf2e79739d8319c4dc79901 (diff)
downloadscala-e0a8ffe88740995150fa7ca58797a4cceed3169f.tar.gz
scala-e0a8ffe88740995150fa7ca58797a4cceed3169f.tar.bz2
scala-e0a8ffe88740995150fa7ca58797a4cceed3169f.zip
assorted typo fixes, cleanup, updating of comments
just in time for Halloween. "boostrap" is definitely the most adorable typo evah -- and one of the most common, too. but we don't want to scare anybody.
-rw-r--r--project/VersionUtil.scala2
-rw-r--r--spec/08-pattern-matching.md2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala10
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala4
-rw-r--r--src/eclipse/README.md4
-rw-r--r--src/interactive/scala/tools/nsc/interactive/CompilerControl.scala4
-rw-r--r--src/library/scala/collection/GenTraversableOnce.scala2
-rw-r--r--src/library/scala/inline.scala2
-rw-r--r--src/library/scala/noinline.scala2
-rw-r--r--src/library/scala/util/Either.scala38
-rw-r--r--src/repl/scala/tools/nsc/interpreter/IMain.scala2
-rw-r--r--test/files/run/indy-via-macro-with-dynamic-args/macro_1.scala4
-rw-r--r--test/files/run/indy-via-macro/macro_1.scala4
-rw-r--r--test/junit/scala/runtime/ScalaRunTimeTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala2
-rw-r--r--versions.properties32
18 files changed, 54 insertions, 66 deletions
diff --git a/project/VersionUtil.scala b/project/VersionUtil.scala
index e2c2715320..409efdd261 100644
--- a/project/VersionUtil.scala
+++ b/project/VersionUtil.scala
@@ -149,7 +149,7 @@ object VersionUtil {
s"https://repo.lightbend.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/$sha/$path/$libName.jar"
}
- /** Copy a boostrap dependency JAR that is on the classpath to a file */
+ /** Copy a bootstrap dependency JAR that is on the classpath to a file */
def copyBootstrapJar(cp: Seq[Attributed[File]], baseDir: File, path: String, libName: String): Unit = {
val org = bootstrapOrganization(path)
val resolved = cp.find { a =>
diff --git a/spec/08-pattern-matching.md b/spec/08-pattern-matching.md
index 38eabf29c5..ecaaa04c2b 100644
--- a/spec/08-pattern-matching.md
+++ b/spec/08-pattern-matching.md
@@ -441,7 +441,7 @@ complexity.
### Type parameter inference for constructor patterns
Assume a constructor pattern $C(p_1 , \ldots , p_n)$ where class $C$
-has type type parameters $a_1 , \ldots , a_n$. These type parameters
+has type parameters $a_1 , \ldots , a_n$. These type parameters
are inferred in the same way as for the typed pattern
`(_: $C[a_1 , \ldots , a_n]$)`.
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
index bac84a4959..0b07e12917 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
@@ -297,14 +297,14 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
case app : Apply =>
generatedType = genApply(app, expectedType)
- case app @ ApplyDynamic(qual, Literal(Constant(boostrapMethodRef: Symbol)) :: staticAndDynamicArgs) =>
- val numStaticArgs = boostrapMethodRef.paramss.head.size - 3 /*JVM provided args*/
+ case app @ ApplyDynamic(qual, Literal(Constant(bootstrapMethodRef: Symbol)) :: staticAndDynamicArgs) =>
+ val numStaticArgs = bootstrapMethodRef.paramss.head.size - 3 /*JVM provided args*/
val (staticArgs, dynamicArgs) = staticAndDynamicArgs.splitAt(numStaticArgs)
- val boostrapDescriptor = staticHandleFromSymbol(boostrapMethodRef)
+ val bootstrapDescriptor = staticHandleFromSymbol(bootstrapMethodRef)
val bootstrapArgs = staticArgs.map({case t @ Literal(c: Constant) => bootstrapMethodArg(c, t.pos)})
val descriptor = methodBTypeFromMethodType(qual.symbol.info, false)
genLoadArguments(dynamicArgs, qual.symbol.info.params.map(param => typeToBType(param.info)))
- mnode.visitInvokeDynamicInsn(qual.symbol.name.encoded, descriptor.descriptor, boostrapDescriptor, bootstrapArgs : _*)
+ mnode.visitInvokeDynamicInsn(qual.symbol.name.encoded, descriptor.descriptor, bootstrapDescriptor, bootstrapArgs : _*)
case ApplyDynamic(qual, args) => sys.error("No invokedynamic support yet.")
@@ -613,7 +613,7 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
}
argsSize match {
case 1 => bc newarray elemKind
- case _ => // this is currently dead code is Scalac, unlike in Dotty
+ case _ => // this is currently dead code in Scalac, unlike in Dotty
val descr = ("[" * argsSize) + elemKind.descriptor // denotes the same as: arrayN(elemKind, argsSize).descriptor
mnode.visitMultiANewArrayInsn(descr, argsSize)
}
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala
index b088b5ee48..e0fd77bb54 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala
@@ -27,7 +27,7 @@ class CallGraph[BT <: BTypes](val btypes: BT) {
*
* Indexing the call graph by the containing MethodNode and the invocation MethodInsnNode allows
* finding callsites efficiently. For example, an inlining heuristic might want to know all
- * callsites withing a callee method.
+ * callsites within a callee method.
*
* Note that the call graph is not guaranteed to be complete: callsites may be missing. In
* particular, if a method is very large, all of its callsites might not be in the hash map.
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala
index fedacdac41..65d1e20d69 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala
@@ -47,7 +47,7 @@ import scala.tools.nsc.backend.jvm.opt.BytecodeUtils._
* note that eliminating empty handlers and stale local variable descriptors is required for
* correctness, see the comment in the body of `methodOptimizations`.
*
- * box-unbox elimination (eliminates box-unbox pairs withing the same method)
+ * box-unbox elimination (eliminates box-unbox pairs within the same method)
* + enables UPSTREAM:
* - nullness optimizations (a box extraction operation (unknown nullness) may be rewritten to
* a read of a non-null local. example in doc comment of box-unbox implementation)
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index cc234eb623..25475515aa 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -1093,7 +1093,7 @@ abstract class Erasure extends InfoTransform
// See SI-5568.
tree setSymbol Object_getClass
} else {
- devWarning(s"The symbol '${fn.symbol}' was interecepted but didn't match any cases, that means the intercepted methods set doesn't match the code")
+ devWarning(s"The symbol '${fn.symbol}' was intercepted but didn't match any cases, that means the intercepted methods set doesn't match the code")
tree
}
} else qual match {
@@ -1209,7 +1209,7 @@ abstract class Erasure extends InfoTransform
try super.transform(tree1).clearType()
finally tpt setType specialErasure(tree1.symbol)(tree1.symbol.tpe).resultType
- case ApplyDynamic(qual, Literal(Constant(boostrapMethodRef: Symbol)) :: _) =>
+ case ApplyDynamic(qual, Literal(Constant(bootstrapMethodRef: Symbol)) :: _) =>
tree
case _ =>
super.transform(tree1).clearType()
diff --git a/src/eclipse/README.md b/src/eclipse/README.md
index f67fa26e5e..c7a4827341 100644
--- a/src/eclipse/README.md
+++ b/src/eclipse/README.md
@@ -57,10 +57,10 @@ If it doesn’t compile
=====================
The likely reason is that the build path of the imported projects isn’t correct. This can happen for instance
-when the [version.properties](https://github.com/scala/scala/blob/master/versions.properties) file is updated,
+when the [versions.properties](https://github.com/scala/scala/blob/master/versions.properties) file is updated,
and Eclipse .classpath of the different projects isn’t updated accordingly. The fix is simple, manually inspect
the build path of each project and make sure the version of the declared dependencies is in sync with the version
-declared in the `version.properties` file. If it isn’t, update it manually and, when done, don’t forget to share
+declared in the `versions.properties` file. If it isn’t, update it manually and, when done, don’t forget to share
your changes via a pull request.
(We are aware this is cumbersome. If you feel like scripting the process, pull requests are of course welcome.)
diff --git a/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala b/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala
index cb12cebc49..462f4432cd 100644
--- a/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala
+++ b/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala
@@ -101,11 +101,11 @@ trait CompilerControl { self: Global =>
* the given sources at the head of the list of to-be-compiled sources.
*/
def askReload(sources: List[SourceFile], response: Response[Unit]) = {
- val superseeded = scheduler.dequeueAll {
+ val superseded = scheduler.dequeueAll {
case ri: ReloadItem if ri.sources == sources => Some(ri)
case _ => None
}
- superseeded.foreach(_.response.set(()))
+ superseded.foreach(_.response.set(()))
postWorkItem(new ReloadItem(sources, response))
}
diff --git a/src/library/scala/collection/GenTraversableOnce.scala b/src/library/scala/collection/GenTraversableOnce.scala
index d3096a872c..f87f7654bc 100644
--- a/src/library/scala/collection/GenTraversableOnce.scala
+++ b/src/library/scala/collection/GenTraversableOnce.scala
@@ -96,7 +96,7 @@ trait GenTraversableOnce[+A] extends Any {
*/
def size: Int
- /** The size of this $coll if it is can be cheaply computed
+ /** The size of this $coll, if it can be cheaply computed
*
* @return the number of elements in this $coll, or -1 if the size cannot be determined cheaply
*/
diff --git a/src/library/scala/inline.scala b/src/library/scala/inline.scala
index dc55af301c..f6d7c7569e 100644
--- a/src/library/scala/inline.scala
+++ b/src/library/scala/inline.scala
@@ -29,7 +29,7 @@ package scala
* }
* }}}
*
- * Note: parentheses are required when annotating a callsite withing a larger expression.
+ * Note: parentheses are required when annotating a callsite within a larger expression.
*
* {{{
* def t1 = f1(1) + f1(1): @noinline // equivalent to (f1(1) + f1(1)): @noinline
diff --git a/src/library/scala/noinline.scala b/src/library/scala/noinline.scala
index a427e170f4..0cd5ef9f64 100644
--- a/src/library/scala/noinline.scala
+++ b/src/library/scala/noinline.scala
@@ -29,7 +29,7 @@ package scala
* }
* }}}
*
- * Note: parentheses are required when annotating a callsite withing a larger expression.
+ * Note: parentheses are required when annotating a callsite within a larger expression.
*
* {{{
* def t1 = f1(1) + f1(1): @noinline // equivalent to (f1(1) + f1(1)): @noinline
diff --git a/src/library/scala/util/Either.scala b/src/library/scala/util/Either.scala
index c332f18295..7bded972f2 100644
--- a/src/library/scala/util/Either.scala
+++ b/src/library/scala/util/Either.scala
@@ -55,31 +55,31 @@ package util
* val left23: Left[Double, Int] = Left(23.0)
* val left42 = Left(42.0)
*
- * for (
- * a <- right1;
- * b <- right2;
+ * for {
+ * a <- right1
+ * b <- right2
* c <- right3
- * ) yield a + b + c // Right(6)
+ * } yield a + b + c // Right(6)
*
- * for (
- * a <- right1;
- * b <- right2;
+ * for {
+ * a <- right1
+ * b <- right2
* c <- left23
- * ) yield a + b + c // Left(23.0)
+ * } yield a + b + c // Left(23.0)
*
- * for (
- * a <- right1;
- * b <- left23;
+ * for {
+ * a <- right1
+ * b <- left23
* c <- right2
- * ) yield a + b + c // Left(23.0)
+ * } yield a + b + c // Left(23.0)
*
* // It is advisable to provide the type of the “missing” value (especially the right value for `Left`)
* // as otherwise that type might be infered as `Nothing` without context:
- * for (
- * a <- left23;
- * b <- right1;
+ * for {
+ * a <- left23
+ * b <- right1
* c <- left42 // type at this position: Either[Double, Nothing]
- * ) yield a + b + c
+ * } yield a + b + c
* // ^
* // error: ambiguous reference to overloaded definition,
* // both method + in class Int of type (x: Char)Int
@@ -136,10 +136,10 @@ sealed abstract class Either[+A, +B] extends Product with Serializable {
* @example {{{
* val right = Right(2)
* val left = Left(3)
- * for (
- * r1 <- right;
+ * for {
+ * r1 <- right
* r2 <- left.swap
- * ) yield r1 * r2 // Right(6)
+ * } yield r1 * r2 // Right(6)
* }}}
*/
def swap: Either[B, A] = this match {
diff --git a/src/repl/scala/tools/nsc/interpreter/IMain.scala b/src/repl/scala/tools/nsc/interpreter/IMain.scala
index 44784aa953..65f2c95f73 100644
--- a/src/repl/scala/tools/nsc/interpreter/IMain.scala
+++ b/src/repl/scala/tools/nsc/interpreter/IMain.scala
@@ -1203,7 +1203,7 @@ class IMain(initialSettings: Settings, protected val out: JPrintWriter) extends
/** Utility methods for the Interpreter. */
object IMain {
- /** Dummy identifier fragement inserted at the cursor before presentation compilation. Needed to support completion of `global.def<TAB>` */
+ /** Dummy identifier fragment inserted at the cursor before presentation compilation. Needed to support completion of `global.def<TAB>` */
val DummyCursorFragment = "_CURSOR_"
// The two name forms this is catching are the two sides of this assignment:
diff --git a/test/files/run/indy-via-macro-with-dynamic-args/macro_1.scala b/test/files/run/indy-via-macro-with-dynamic-args/macro_1.scala
index cb8719a235..eaafbf08e1 100644
--- a/test/files/run/indy-via-macro-with-dynamic-args/macro_1.scala
+++ b/test/files/run/indy-via-macro-with-dynamic-args/macro_1.scala
@@ -24,8 +24,8 @@ object Macro {
import c.universe._
pat match {
case l @ Literal(Constant(pat: String)) =>
- val boostrapSym = typeOf[test.Bootstrap].companion.member(TermName("bootstrap"))
- Indy(boostrapSym, l :: Nil, text :: Nil)
+ val bootstrapSym = typeOf[test.Bootstrap].companion.member(TermName("bootstrap"))
+ Indy(bootstrapSym, l :: Nil, text :: Nil)
case _ =>
q"_root_.java.util.regex.Pattern.compile($pat).matcher($text)"
}
diff --git a/test/files/run/indy-via-macro/macro_1.scala b/test/files/run/indy-via-macro/macro_1.scala
index 66e319e262..26daad7deb 100644
--- a/test/files/run/indy-via-macro/macro_1.scala
+++ b/test/files/run/indy-via-macro/macro_1.scala
@@ -23,8 +23,8 @@ object Macro {
import c.universe._
s match {
case l @ Literal(Constant(s: String)) =>
- val boostrapSym = typeOf[test.Bootstrap].companion.member(TermName("bootstrap"))
- Indy(boostrapSym, l :: Nil)
+ val bootstrapSym = typeOf[test.Bootstrap].companion.member(TermName("bootstrap"))
+ Indy(bootstrapSym, l :: Nil)
case _ =>
q"_root_.java.util.regex.Pattern.compile($s)"
}
diff --git a/test/junit/scala/runtime/ScalaRunTimeTest.scala b/test/junit/scala/runtime/ScalaRunTimeTest.scala
index 5bfb12610e..ba3bf0b703 100644
--- a/test/junit/scala/runtime/ScalaRunTimeTest.scala
+++ b/test/junit/scala/runtime/ScalaRunTimeTest.scala
@@ -9,7 +9,7 @@ import org.junit.runners.JUnit4
@RunWith(classOf[JUnit4])
class ScalaRunTimeTest {
@Test
- def testStingOf() {
+ def testStringOf() {
import ScalaRunTime.stringOf
import scala.collection._
import parallel.ParIterable
diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala
index a2513cacdc..5362585642 100644
--- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala
+++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala
@@ -13,7 +13,7 @@ class InlinerSeparateCompilationTest {
val args = "-opt:l:classpath"
@Test
- def inlnieMixedinMember(): Unit = {
+ def inlineMixedinMember(): Unit = {
val codeA =
"""trait T {
| @inline def f = 0
diff --git a/versions.properties b/versions.properties
index 1f43b9cc56..950f73baa1 100644
--- a/versions.properties
+++ b/versions.properties
@@ -1,24 +1,14 @@
-#Mon, 05 Oct 2015 14:25:00 +0000
-# NOTE: this file determines the content of the scala-distribution
-# via scala-dist-pom.xml and scala-library-all-pom.xml
-# when adding new properties that influence a release,
-# also add them to the update.versions mechanism in build.xml,
-# which is used by the release script scripts/jobs/integrate/bootstrap
-
-# The scala version used for bootstrapping. This has no impact on the final classfiles:
-# there are two stages (locker and quick), so compiler and library are always built
-# with themselves. Stability is ensured by building a third stage (strap).
+# Scala version used for bootstrapping. (This has no impact on the
+# final classfiles, since compiler and library are built first using
+# starr, then rebuilt using themselves.)
starr.version=2.12.0-RC1-1e81a09
-# These are the versions of the modules that go with this release.
-# These properties are used during PR validation and in dbuild builds.
-
-# The scala.binary.version determines how modules are resolved. For example, it
-# determines which partest artifact is being used for running the tests.
-# It has to be set in the following way:
+# Set in the following way:
# - After 2.x.0 is released, the binary version is 2.x.
# - During milestones and RCs, modules are cross-built against the full version.
# So the value is the full version (e.g. 2.12.0-M2).
+# Also determines how modules are resolved. For example, it determines which
+# partest artifact is being used for running the tests.
scala.binary.version=2.12.0-RC1
# external modules shipped with distribution, as specified by scala-library-all's pom
@@ -27,14 +17,12 @@ scala-parser-combinators.version.number=1.0.4
scala-swing.version.number=2.0.0-M2
scala-swing.version.osgi=2.0.0.M2
jline.version=2.14.1
+# this one is shaded and embedded in scala-compiler.jar
scala-asm.version=5.1.0-scala-1
# external modules, used internally (not shipped)
partest.version.number=1.0.17
-# We've embedded these sources in partest-extras for now. After 2.12.0 is released
-# we can switch to a public release.
-# scalacheck.version.number=1.11.6
-# TODO: modularize the compiler
-#scala-compiler-doc.version.number=1.0.0-RC1
-#scala-compiler-interactive.version.number=1.0.0-RC1
+# TODO: We've embedded these sources in partest-extras for now.
+# after 2.12.0 is out, we can switch back to a public release.
+# scalacheck.version.number=1.11.6