summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md13
-rw-r--r--build.number2
-rw-r--r--spec/04-basic-declarations-and-definitions.md2
-rw-r--r--spec/05-classes-and-objects.md2
-rw-r--r--src/build/InnerObjectTestGen.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala8
-rw-r--r--src/compiler/scala/tools/nsc/reporters/Reporter.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala37
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala4
-rw-r--r--src/partest-extras/scala/tools/partest/ASMConverters.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Types.scala4
-rw-r--r--src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala2
-rw-r--r--src/reflect/scala/reflect/macros/FrontEnds.scala2
-rw-r--r--src/repl/scala/tools/nsc/interpreter/JavapClass.scala6
-rw-r--r--test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala4
-rw-r--r--test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala6
-rw-r--r--test/disabled/coder/Coder.scala4
-rw-r--r--test/disabled/run/coder2/Coder2.scala2
-rw-r--r--test/files/neg/macro-invalidshape.check5
-rw-r--r--test/files/neg/missing-arg-list.check21
-rw-r--r--test/files/neg/missing-arg-list.scala13
-rw-r--r--test/files/neg/t5120.scala2
-rw-r--r--test/files/neg/t836.scala2
-rw-r--r--test/files/neg/warn-unused-privates.scala2
-rw-r--r--test/files/run/ReplacementMatching.scala4
-rw-r--r--test/files/run/finally.check2
-rw-r--r--test/files/run/finally.scala4
-rw-r--r--test/files/run/t6440b.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala2
-rw-r--r--versions.properties4
34 files changed, 106 insertions, 69 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e9505c26df..54334aea48 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,15 +4,19 @@ We follow the standard GitHub [fork & pull](https://help.github.com/articles/usi
You're always welcome to submit your PR straight away and start the discussion (without reading the rest of this wonderful doc, or the `READMEnot^H^H^H.md`). The goal of these notes is to make your experience contributing to Scala as smooth and pleasant as possible. We're happy to guide you through the process once you've submitted your PR.
## The Scala Community
-Last year, you -- the Scala community -- matched the core team at EPFL in number of commits contributed to Scala 2.11, doubling the percentage of commits from outside EPFL/Typesafe since 2.10. Excellent work! (The split is roughly 25/25/50 for you/epfl/typesafe. By the way, the team at Typesafe is: @adriaanm, @gkossakowski, @lrytz and @retronym.)
+In 2014, you -- the Scala community -- matched the core team at EPFL in number of commits contributed to Scala 2.11, doubling the percentage of commits from outside EPFL/Typesafe since 2.10. Excellent work! (The split was roughly 25/25/50 for you/EPFL/Typesafe.)
We are super happy about this, and are eager to make your experience contributing to Scala productive and satisfying, so that we can keep up this growth. We can't do this alone (nor do we want to)!
This is why we're collecting these notes on how to contribute, and we hope you'll share your experience to improve the process for the next contributor! (Feel free to send a PR for this note, send your thoughts to scala-internals, or tweet about it to @adriaanm.)
+By the way, the team at Typesafe is: @adriaanm, @lrytz, @retronym, and @SethTisue.
+
## What kind of PR are you submitting?
-Regardless of the nature of your Pull Request, we have to ask you to sign the [Scala CLA](http://typesafe.com/contribute/cla/scala), to protect the OSS nature of the code base.
+Regardless of the nature of your Pull Request, we have to ask you to digitally sign the [Scala CLA](http://typesafe.com/contribute/cla/scala), to protect the OSS nature of the code base.
+
+You don't need to submit separate PRs for 2.11.x, 2.12.x, and 2.13.x. Any changes accepted on one of these branches will, in time, be merged into the later branches.
### Documentation
Whether you finally decided you couldn't stand that annoying typo anymore, you fixed the outdated code sample in some comment, or you wrote a nice, comprehensive, overview for an under-documented package, some docs for a class or the specifics about a method, your documentation improvement is very much appreciated, and we will do our best to fasttrack it.
@@ -28,9 +32,9 @@ The kind of code we can accept depends on the life cycle for the release you're
#### Bug Fix
-Prefix your commit title with "SI-NNNN", where https://issues.scala-lang.org/browse/SI-NNNN tracks the bug you're fixing. We also recommend naming your branch after the Jira ticket number.
+Prefix your commit title with "SI-NNNN", where https://issues.scala-lang.org/browse/SI-NNNN tracks the bug you're fixing. We also recommend naming your branch after the JIRA ticket number.
-Please make sure the Jira ticket's fix version corresponds to the upcoming milestone for the branch your PR targets (the CI automation will automatically assign the milestone after you open the PR).
+Please make sure the JIRA ticket's fix version corresponds to the upcoming milestone for the branch your PR targets. The CI automation will automatically assign the milestone after you open the PR.
#### Enhancement or New Feature
@@ -49,4 +53,3 @@ A new language feature requires a SIP (Scala Improvement Process) proposal. For
- [Boy Scout Rule](http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule) should be applied.
Please also have a look at our [Pull Request Policy](https://github.com/scala/scala/wiki/Pull-Request-Policy), as well as the [Scala Hacker Guide](http://www.scala-lang.org/contribute/hacker-guide.html) by @xeno-by.
-
diff --git a/build.number b/build.number
index f5c5adfc0f..cdba0b70ec 100644
--- a/build.number
+++ b/build.number
@@ -4,7 +4,7 @@
version.major=2
version.minor=11
-version.patch=7
+version.patch=8
# This is the -N part of a version (2.9.1-1). If it's 0, it's dropped from maven versions. It should not be used again.
version.bnum=0
diff --git a/spec/04-basic-declarations-and-definitions.md b/spec/04-basic-declarations-and-definitions.md
index 8437d2ea71..7790428ca8 100644
--- a/spec/04-basic-declarations-and-definitions.md
+++ b/spec/04-basic-declarations-and-definitions.md
@@ -627,7 +627,7 @@ parameters and associate them with their types.
Each value parameter
declaration may optionally define a default argument. The default argument
expression $e$ is type-checked with an expected type $T'$ obtained
-by replacing all occurences of the function's type parameters in $T$ by
+by replacing all occurrences of the function's type parameters in $T$ by
the undefined type.
For every parameter $p_{i,j}$ with a default argument a method named
diff --git a/spec/05-classes-and-objects.md b/spec/05-classes-and-objects.md
index cff5442641..3a70f2a137 100644
--- a/spec/05-classes-and-objects.md
+++ b/spec/05-classes-and-objects.md
@@ -964,7 +964,7 @@ This form of extensibility can be excluded by declaring the base class
directly extend `Expr` must be in the same source file as
`Expr`.
-### Traits
+## Traits
```ebnf
TmplDef ::= `trait' TraitDef
diff --git a/src/build/InnerObjectTestGen.scala b/src/build/InnerObjectTestGen.scala
index b66112609c..e0b889c969 100644
--- a/src/build/InnerObjectTestGen.scala
+++ b/src/build/InnerObjectTestGen.scala
@@ -22,7 +22,7 @@ object Contexts extends Enumeration {
* object, or equivalent).
*
* Usage: TestGen <nr of levels>
- * - by default it's 2 leves. Currently, 3-level deep uncovers bugs in the type checker.
+ * - by default it's 2 levels. Currently, 3-level deep uncovers bugs in the type checker.
*
* @author Iulian Dragos
*/
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala
index 8f2a17a2bf..eb0da7caef 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala
@@ -439,7 +439,7 @@ abstract class BCodeIdiomatic extends SubComponent {
else { emitTypeBased(JCodeMethodN.returnOpcodes, tk) }
}
- /* Emits one of tableswitch or lookoupswitch.
+ /* Emits one of tableswitch or lookupswitch.
*
* can-multi-thread
*/
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
index 9c6889668d..8720da84e8 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
@@ -648,7 +648,7 @@ abstract class BTypes {
* JVMS 4.7.7: the attribute must be present "if and only if it represents a local class
* or an anonymous class" (i.e. not for member classes).
*
- * The attribute is mis-named, it should be called "EnclosingClass". It has to be defined for all
+ * The attribute is misnamed, it should be called "EnclosingClass". It has to be defined for all
* local and anonymous classes, no matter if there is an enclosing method or not. Accordingly, the
* "class" field (see below) must be always defined, while the "method" field may be null.
*
@@ -798,7 +798,7 @@ abstract class BTypes {
* 2. The ClassBType should be built from a classfile, but the class could not be found on the
* compilation classpath.
*
- * Note that all ClassBTypes required in a non-optimzied run are built during code generation from
+ * Note that all ClassBTypes required in a non-optimized run are built during code generation from
* the class symbols referenced by the ASTs, so they have a valid info. Therefore the backend
* often invokes `info.get` (which asserts the info to exist) when reading data from the ClassBType.
*
@@ -942,7 +942,7 @@ abstract class BTypes {
*/
def jvmWiseLUB(other: ClassBType): Either[NoClassBTypeInfo, ClassBType] = {
def isNotNullOrNothing(c: ClassBType) = !c.isNullType && !c.isNothingType
- assert(isNotNullOrNothing(this) && isNotNullOrNothing(other), s"jvmWiseLub for null or nothing: $this - $other")
+ assert(isNotNullOrNothing(this) && isNotNullOrNothing(other), s"jvmWiseLUB for null or nothing: $this - $other")
tryEither {
val res: ClassBType = (this.isInterface.orThrow, other.isInterface.orThrow) match {
@@ -967,7 +967,7 @@ abstract class BTypes {
firstCommonSuffix(this :: this.superClassesTransitive.orThrow, other :: other.superClassesTransitive.orThrow)
}
- assert(isNotNullOrNothing(res), s"jvmWiseLub computed: $res")
+ assert(isNotNullOrNothing(res), s"jvmWiseLUB computed: $res")
Right(res)
}
}
diff --git a/src/compiler/scala/tools/nsc/reporters/Reporter.scala b/src/compiler/scala/tools/nsc/reporters/Reporter.scala
index 3d688efae1..bd438f0e75 100644
--- a/src/compiler/scala/tools/nsc/reporters/Reporter.scala
+++ b/src/compiler/scala/tools/nsc/reporters/Reporter.scala
@@ -20,7 +20,7 @@ abstract class Reporter extends scala.reflect.internal.Reporter {
/** Informational messages. If `!force`, they may be suppressed. */
final def info(pos: Position, msg: String, force: Boolean): Unit = info0(pos, msg, INFO, force)
- /** For sending a message which should not be labeled as a warning/error,
+ /** For sending a message which should not be labelled as a warning/error,
* but also shouldn't require -verbose to be visible.
*/
def echo(msg: String): Unit = info(NoPosition, msg, force = true)
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala
index 9e9372f709..8beb1837ad 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala
@@ -40,7 +40,7 @@ trait MatchWarnings {
}
}
- // Issue better warnings than "unreachable code" when people mis-use
+ // Issue better warnings than "unreachable code" when people misuse
// variable patterns thinking they bind to existing identifiers.
//
// Possible TODO: more deeply nested variable patterns, like
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
index c80aaea160..b0bd9977a8 100644
--- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
@@ -550,23 +550,18 @@ trait ContextErrors {
def ModuleUsingCompanionClassDefaultArgsErrror(tree: Tree) =
NormalTypeError(tree, "module extending its companion class cannot use default constructor arguments")
- def NotEnoughArgsError(tree: Tree, fun0: Tree, missing0: List[Symbol]) = {
- def notEnoughArgumentsMsg(fun: Tree, missing: List[Symbol]) = {
- val suffix = {
- if (missing.isEmpty) ""
- else {
- val keep = missing take 3 map (_.name)
- ".\nUnspecified value parameter%s %s".format(
- if (missing.tail.isEmpty) "" else "s",
- if ((missing drop 3).nonEmpty) (keep :+ "...").mkString(", ")
- else keep.mkString("", ", ", ".")
- )
- }
+ def NotEnoughArgsError(tree: Tree, fun: Tree, missing: List[Symbol]) = {
+ val notEnoughArgumentsMsg = {
+ val suffix = if (missing.isEmpty) "" else {
+ val keep = missing take 3 map (_.name)
+ val ess = if (missing.tail.isEmpty) "" else "s"
+ f".%nUnspecified value parameter$ess ${
+ keep.mkString("", ", ", if ((missing drop 3).nonEmpty) "..." else ".")
+ }"
}
-
- "not enough arguments for " + treeSymTypeMsg(fun) + suffix
+ s"not enough arguments for ${ treeSymTypeMsg(fun) }$suffix"
}
- NormalTypeError(tree, notEnoughArgumentsMsg(fun0, missing0))
+ NormalTypeError(tree, notEnoughArgumentsMsg)
}
//doTypedApply - patternMode
@@ -632,12 +627,16 @@ trait ContextErrors {
//adapt
def MissingArgsForMethodTpeError(tree: Tree, meth: Symbol) = {
+ val f = meth.name
+ val paf = s"$f(${ meth.asMethod.paramLists map (_ map (_ => "_") mkString ",") mkString ")(" })"
+ val advice = s"""
+ |Unapplied methods are only converted to functions when a function type is expected.
+ |You can make this conversion explicit by writing `$f _` or `$paf` instead of `$f`.""".stripMargin
val message =
if (meth.isMacro) MacroTooFewArgumentListsMessage
- else "missing arguments for " + meth.fullLocationString + (
- if (meth.isConstructor) ""
- else ";\nfollow this method with `_' if you want to treat it as a partially applied function"
- )
+ else s"""missing argument list for ${meth.fullLocationString}${
+ if (!meth.isConstructor) advice else ""
+ }"""
issueNormalTypeError(tree, message)
setError(tree)
}
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index 542f58795a..a7ef5d5d2f 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -1537,7 +1537,7 @@ object ContextMode {
final val TypeConstructorAllowed: ContextMode = 1 << 16
/** TODO: The "sticky modes" are EXPRmode, PATTERNmode, TYPEmode.
- * To mimick the sticky mode behavior, when captain stickyfingers
+ * To mimic the sticky mode behavior, when captain stickyfingers
* comes around we need to propagate those modes but forget the other
* context modes which were once mode bits; those being so far the
* ones listed here.
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala b/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala
index 8a66c7d274..a702b3cdf5 100644
--- a/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala
@@ -305,7 +305,7 @@ trait PatternTypers {
// clearing the type is necessary so that ref will be stabilized; see bug 881
val fun1 = typedPos(fun.pos)(Apply(Select(fun.clearType(), unapplyMethod), unapplyArgTree :: Nil))
- def makeTypedUnApply() = {
+ def makeTypedUnapply() = {
// the union of the expected type and the inferred type of the argument to unapply
val glbType = glb(ensureFullyDefined(pt) :: unapplyArg.tpe_* :: Nil)
val wrapInTypeTest = canRemedy && !(fun1.symbol.owner isNonBottomSubClass ClassTagClass)
@@ -325,7 +325,7 @@ trait PatternTypers {
if (isBlackbox(unapplyMethod)) duplErrorTree(BlackboxExtractorExpansion(tree))
else duplErrorTree(WrongShapeExtractorExpansion(tree))
} else
- makeTypedUnApply()
+ makeTypedUnapply()
}
def wrapClassTagUnapply(uncheckedPattern: Tree, classTagExtractor: Tree, pt: Type): Tree = {
diff --git a/src/partest-extras/scala/tools/partest/ASMConverters.scala b/src/partest-extras/scala/tools/partest/ASMConverters.scala
index f6e2d2a9ec..90f314428b 100644
--- a/src/partest-extras/scala/tools/partest/ASMConverters.scala
+++ b/src/partest-extras/scala/tools/partest/ASMConverters.scala
@@ -131,7 +131,7 @@ object ASMConverters {
import collection.mutable.{Map => MMap}
/**
- * Bytecode is equal modula local variable numbering and label numbering.
+ * Bytecode is equal modulo local variable numbering and label numbering.
*/
def equivalentBytecode(as: List[Instruction], bs: List[Instruction], varMap: MMap[Int, Int] = MMap(), labelMap: MMap[Int, Int] = MMap()): Boolean = {
def same(v1: Int, v2: Int, m: MMap[Int, Int]) = {
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala
index f74d976b82..c760db3864 100644
--- a/src/reflect/scala/reflect/internal/Types.scala
+++ b/src/reflect/scala/reflect/internal/Types.scala
@@ -918,7 +918,7 @@ trait Types
def prefixString = trimPrefix(toString) + "#"
/** Convert toString avoiding infinite recursions by cutting off
- * after `maxTostringRecursions` recursion levels. Uses `safeToString`
+ * after `maxToStringRecursions` recursion levels. Uses `safeToString`
* to produce a string on each level.
*/
override final def toString: String = {
@@ -1489,7 +1489,7 @@ trait Types
} finally {
if (Statistics.canEnable) Statistics.popTimer(typeOpsStack, start)
}
- // [Martin] suppressing memo-ization solves the problem with "same type after erasure" errors
+ // [Martin] suppressing memoization solves the problem with "same type after erasure" errors
// when compiling with
// scalac scala.collection.IterableViewLike.scala scala.collection.IterableLike.scala
// I have not yet figured out precisely why this is the case.
diff --git a/src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala b/src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala
index f79099213a..e321a07f51 100644
--- a/src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala
+++ b/src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala
@@ -99,7 +99,7 @@ private[internal] trait TypeConstraints {
// a lower bound despite the fact that Nothing is always a lower bound. My current
// supposition is that the side-effecting type constraint accumulation mechanism
// depends on these subtype tests being performed to make forward progress when
- // there are mutally recursive type vars.
+ // there are mutually recursive type vars.
// See pos/t6367 and pos/t6499 for the competing test cases.
val mustConsider = tp.typeSymbol match {
case NothingClass => true
diff --git a/src/reflect/scala/reflect/macros/FrontEnds.scala b/src/reflect/scala/reflect/macros/FrontEnds.scala
index a770f325b2..8ad41382a8 100644
--- a/src/reflect/scala/reflect/macros/FrontEnds.scala
+++ b/src/reflect/scala/reflect/macros/FrontEnds.scala
@@ -12,7 +12,7 @@ package macros
trait FrontEnds {
self: blackbox.Context =>
- /** For sending a message which should not be labeled as a warning/error,
+ /** For sending a message which should not be labelled as a warning/error,
* but also shouldn't require -verbose to be visible.
* Use `enclosingPosition` if you're in doubt what position to pass to `pos`.
*/
diff --git a/src/repl/scala/tools/nsc/interpreter/JavapClass.scala b/src/repl/scala/tools/nsc/interpreter/JavapClass.scala
index 1ccade2172..c240ab027a 100644
--- a/src/repl/scala/tools/nsc/interpreter/JavapClass.scala
+++ b/src/repl/scala/tools/nsc/interpreter/JavapClass.scala
@@ -747,15 +747,15 @@ object JavapClass {
// on second thought, we don't care about lambda method classes, just the impl methods
val rev =
res flatMap {
- case x @ closure(_, "lambda", _, _) => labdaMethod(x, target)
- //target.member flatMap (_ => labdaMethod(x, target)) getOrElse s"${target.name}#$$anonfun"
+ case x @ closure(_, "lambda", _, _) => lambdaMethod(x, target)
+ //target.member flatMap (_ => lambdaMethod(x, target)) getOrElse s"${target.name}#$$anonfun"
case x => Some(x)
}
rev
}
// given C$lambda$$g$n for member g and n in 1..N, find the C.accessor$x
// and the C.$anonfun$x it forwards to.
- def labdaMethod(lambda: String, target: Target): Option[String] = {
+ def lambdaMethod(lambda: String, target: Target): Option[String] = {
import scala.tools.asm.ClassReader
import scala.tools.asm.Opcodes.INVOKESTATIC
import scala.tools.asm.tree.{ ClassNode, MethodInsnNode }
diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala
index 9cc1f4a0f6..04e37085b8 100644
--- a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala
+++ b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala
@@ -16,7 +16,7 @@ class SeqCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
@@ -63,7 +63,7 @@ class ParCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala
index ba32036002..9300851b5f 100644
--- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala
+++ b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala
@@ -425,7 +425,7 @@ trait SequentialOps[T] {
}
def sequentialDiff(sq: Seq[T], sz: Int) = {
- val occmap = occurences(sq)
+ val occmap = occurrences(sq)
val b = new collection.mutable.ArrayBuffer[T]
var i = 0
@@ -442,7 +442,7 @@ trait SequentialOps[T] {
}
def sequentialIntersect(sq: Seq[T], sz: Int) = {
- val occmap = occurences(sq)
+ val occmap = occurrences(sq)
val b = new collection.mutable.ArrayBuffer[T]
var i = 0
@@ -461,7 +461,7 @@ trait SequentialOps[T] {
res
}
- private def occurences(sq: Seq[T]) = {
+ private def occurrences(sq: Seq[T]) = {
val occmap = new collection.mutable.HashMap[T, Int] { override def default(k: T) = 0 }
for (elem <- sq.iterator) occmap(elem) += 1
occmap
diff --git a/test/disabled/coder/Coder.scala b/test/disabled/coder/Coder.scala
index 4e29c2a6ee..62b99e0cf0 100644
--- a/test/disabled/coder/Coder.scala
+++ b/test/disabled/coder/Coder.scala
@@ -10,7 +10,7 @@ class SeqCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
@@ -65,7 +65,7 @@ class ParCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
diff --git a/test/disabled/run/coder2/Coder2.scala b/test/disabled/run/coder2/Coder2.scala
index 43b2e9bcb8..c1ec70b842 100644
--- a/test/disabled/run/coder2/Coder2.scala
+++ b/test/disabled/run/coder2/Coder2.scala
@@ -10,7 +10,7 @@ class SeqCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
diff --git a/test/files/neg/macro-invalidshape.check b/test/files/neg/macro-invalidshape.check
index aa694df6d6..5093b87598 100644
--- a/test/files/neg/macro-invalidshape.check
+++ b/test/files/neg/macro-invalidshape.check
@@ -8,8 +8,9 @@ macro [<static object>].<method name>[[<type args>]] or
macro [<macro bundle>].<method name>[[<type args>]]
def foo2(x: Any) = macro Impls.foo(null)(null)
^
-Macros_Test_2.scala:4: error: missing arguments for method foo in object Impls;
-follow this method with `_' if you want to treat it as a partially applied function
+Macros_Test_2.scala:4: error: missing argument list for method foo in object Impls
+Unapplied methods are only converted to functions when a function type is expected.
+You can make this conversion explicit by writing `foo _` or `foo(_)(_)` instead of `foo`.
def foo3(x: Any) = macro {2; Impls.foo}
^
Macros_Test_2.scala:7: error: macro implementation reference has wrong shape. required:
diff --git a/test/files/neg/missing-arg-list.check b/test/files/neg/missing-arg-list.check
new file mode 100644
index 0000000000..5a011c36f2
--- /dev/null
+++ b/test/files/neg/missing-arg-list.check
@@ -0,0 +1,21 @@
+missing-arg-list.scala:9: error: missing argument list for method id in trait T
+Unapplied methods are only converted to functions when a function type is expected.
+You can make this conversion explicit by writing `id _` or `id(_)` instead of `id`.
+ val w = id
+ ^
+missing-arg-list.scala:10: error: missing argument list for method f in trait T
+Unapplied methods are only converted to functions when a function type is expected.
+You can make this conversion explicit by writing `f _` or `f(_)(_)` instead of `f`.
+ val x = f
+ ^
+missing-arg-list.scala:11: error: missing argument list for method g in trait T
+Unapplied methods are only converted to functions when a function type is expected.
+You can make this conversion explicit by writing `g _` or `g(_,_,_)` instead of `g`.
+ val y = g
+ ^
+missing-arg-list.scala:12: error: missing argument list for method h in trait T
+Unapplied methods are only converted to functions when a function type is expected.
+You can make this conversion explicit by writing `h _` or `h(_,_,_)(_)` instead of `h`.
+ val z = h
+ ^
+four errors found
diff --git a/test/files/neg/missing-arg-list.scala b/test/files/neg/missing-arg-list.scala
new file mode 100644
index 0000000000..c422dd32fe
--- /dev/null
+++ b/test/files/neg/missing-arg-list.scala
@@ -0,0 +1,13 @@
+
+trait T {
+
+ def id(i: Int) = i
+ def f(i: Int)(j: Int) = i+j
+ def g(i: Int, j: Int, k: Int) = i+j+k
+ def h(i: Int, j: Int, k: Int)(implicit s: String) = s*(i+j+k)
+
+ val w = id
+ val x = f
+ val y = g
+ val z = h
+}
diff --git a/test/files/neg/t5120.scala b/test/files/neg/t5120.scala
index f28b2cfb4f..0df67bc09b 100644
--- a/test/files/neg/t5120.scala
+++ b/test/files/neg/t5120.scala
@@ -12,7 +12,7 @@ object Test {
str.x1.length
}
}
-// another way demonstrating the same underlying problem, as reported by roman kalukiewicz
+// another way demonstrating the same underlying problem, as reported by Roman Kalukiewicz
class Holder[_T](_f1 : _T, _f2 : _T) {
type T = _T
diff --git a/test/files/neg/t836.scala b/test/files/neg/t836.scala
index 3633b816c6..4b86d04013 100644
--- a/test/files/neg/t836.scala
+++ b/test/files/neg/t836.scala
@@ -12,5 +12,5 @@ abstract class A {
class B extends A {
type MyObj = ObjImpl
val myString: S = "hello"
- val realString: String = myString // error: type missmatch
+ val realString: String = myString // error: type mismatch
}
diff --git a/test/files/neg/warn-unused-privates.scala b/test/files/neg/warn-unused-privates.scala
index 2faa07e759..2eda280d40 100644
--- a/test/files/neg/warn-unused-privates.scala
+++ b/test/files/neg/warn-unused-privates.scala
@@ -21,7 +21,7 @@ class B3(msg0: String) extends A("msg")
/*** Early defs warnings disabled primarily due to SI-6595.
* The test case is here to assure we aren't issuing false positives;
- * the ones labeled "warn" don't warn.
+ * the ones labelled "warn" don't warn.
***/
class Boppy extends {
private val hmm: String = "abc" // no warn, used in early defs
diff --git a/test/files/run/ReplacementMatching.scala b/test/files/run/ReplacementMatching.scala
index 05040d98a3..81034aa510 100644
--- a/test/files/run/ReplacementMatching.scala
+++ b/test/files/run/ReplacementMatching.scala
@@ -32,12 +32,12 @@ object Test {
def groupsMatching {
val Date = """(\d+)/(\d+)/(\d+)""".r
- for (Regex.Groups(a, b, c) <- Date findFirstMatchIn "1/1/2001 marks the start of the millenium. 31/12/2000 doesn't.") {
+ for (Regex.Groups(a, b, c) <- Date findFirstMatchIn "1/1/2001 marks the start of the millennium. 31/12/2000 doesn't.") {
assert(a == "1")
assert(b == "1")
assert(c == "2001")
}
- for (Regex.Groups(a, b, c) <- (Date findAllIn "1/1/2001 marks the start of the millenium. 31/12/2000 doesn't.").matchData) {
+ for (Regex.Groups(a, b, c) <- (Date findAllIn "1/1/2001 marks the start of the millennium. 31/12/2000 doesn't.").matchData) {
assert(a == "1" || a == "31")
assert(b == "1" || b == "12")
assert(c == "2001" || c == "2000")
diff --git a/test/files/run/finally.check b/test/files/run/finally.check
index 901a797426..b0f2293d11 100644
--- a/test/files/run/finally.check
+++ b/test/files/run/finally.check
@@ -29,7 +29,7 @@ body
in finally
java.lang.Exception
----------------------------------------
-Running nestedFinalies
+Running nestedFinallyBlocks
in finally 1
in finally 2
----------------------------------------
diff --git a/test/files/run/finally.scala b/test/files/run/finally.scala
index b66354ca03..467c9e5868 100644
--- a/test/files/run/finally.scala
+++ b/test/files/run/finally.scala
@@ -94,7 +94,7 @@ object Test extends App {
}
// nested finally blocks with return value
- def nestedFinalies: Int =
+ def nestedFinallyBlocks: Int =
try {
try {
return 10
@@ -123,5 +123,5 @@ object Test extends App {
test(throwBody, "throwBody")
test(retFinally, "retFinally")
test(throwFinally, "throwFinally")
- test(nestedFinalies, "nestedFinalies")
+ test(nestedFinallyBlocks, "nestedFinallyBlocks")
}
diff --git a/test/files/run/t6440b.scala b/test/files/run/t6440b.scala
index 974aca2844..7ab9529ccb 100644
--- a/test/files/run/t6440b.scala
+++ b/test/files/run/t6440b.scala
@@ -35,7 +35,7 @@ object Test extends StoreReporterDirectTest {
def app2 = """
package pack3
object Test {
- pack2.V.u.t // we have to fail if T.class is misisng
+ pack2.V.u.t // we have to fail if T.class is missing
}
"""
diff --git a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala
index 4086f7dd7b..240d3523f1 100644
--- a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala
+++ b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala
@@ -28,7 +28,7 @@ class DirectCompileTest extends ClearAfterClass {
|}
""".stripMargin)
def s(i: Int, n: Int) = (bytes(i) & 0xff) << n
- assertTrue((s(0, 24) | s(1, 16) | s(2, 8) | s(3, 0)) == 0xcafebabe) // mocha java latte machiatto surpreme dark roasted espresso
+ assertTrue((s(0, 24) | s(1, 16) | s(2, 8) | s(3, 0)) == 0xcafebabe) // mocha java latte macchiato surpreme dark roasted espresso
}
@Test
diff --git a/test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala b/test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala
index a37ba31b31..5dee488285 100644
--- a/test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala
+++ b/test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala
@@ -42,7 +42,7 @@ class FlatClassPathResolverTest {
// In Java TemporaryFolder in JUnit is managed automatically using @Rule.
// It would work also in Scala after adding and extending a class like
// TestWithTempFolder.java containing it. But in this case it doesn't work when running tests
- // from the command line - java class is not compiled due to some, misterious reasons.
+ // from the command line - java class is not compiled due to some, mysterious reasons.
// That's why such dirs are here created and deleted manually.
tempDir.create()
tempDir.newFile("TestSourceInRootPackage.scala")
diff --git a/versions.properties b/versions.properties
index 9f297e9b93..529365c9f9 100644
--- a/versions.properties
+++ b/versions.properties
@@ -8,7 +8,7 @@
# The scala version used for boostrapping. 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).
-starr.version=2.11.6
+starr.version=2.11.7
# These are the versions of the modules that go with this release.
# These properties are used during PR validation and in dbuild builds.
@@ -22,7 +22,7 @@ starr.version=2.11.6
scala.binary.version=2.11
# e.g. 2.11.0-RC1, 2.11.0, 2.11.1-RC1, 2.11.1
# this defines the dependency on scala-continuations-plugin in scala-dist's pom
-scala.full.version=2.11.6
+scala.full.version=2.11.7
# external modules shipped with distribution, as specified by scala-library-all's pom
scala-xml.version.number=1.0.4