Skip to content

Commit 216e09b

Browse files
committed
Merge pull request scala#4622 from retronym/merge/2.11.x-to-2.12.x-20150713
Merge 2.11.x to 2.12.x [ci: last-only]
2 parents 9df8f8a + 18e3e61 commit 216e09b

File tree

175 files changed

+484
-375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+484
-375
lines changed

spec/04-basic-declarations-and-definitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ parameters and associate them with their types.
627627
Each value parameter
628628
declaration may optionally define a default argument. The default argument
629629
expression $e$ is type-checked with an expected type $T'$ obtained
630-
by replacing all occurences of the function's type parameters in $T$ by
630+
by replacing all occurrences of the function's type parameters in $T$ by
631631
the undefined type.
632632

633633
For every parameter $p_{i,j}$ with a default argument a method named

src/compiler/scala/reflect/quasiquotes/Reifiers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ trait Reifiers { self: Quasiquotes =>
317317
* Reification of non-trivial list is done in two steps:
318318
*
319319
* 1. split the list into groups where every placeholder is always
320-
* put in a group of its own and all subsquent non-holeMap are
320+
* put in a group of its own and all subsequent non-holeMap are
321321
* grouped together; element is considered to be a placeholder if it's
322322
* in the domain of the fill function;
323323
*

src/compiler/scala/tools/nsc/Properties.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ object Properties extends scala.util.PropertiesTrait {
1212
protected def pickJarBasedOn = classOf[Global]
1313

1414
// settings based on jar properties, falling back to System prefixed by "scala."
15+
16+
// messages to display at startup or prompt, format string with string parameters
17+
// Scala version, Java version, JVM name
1518
def residentPromptString = scalaPropOrElse("resident.prompt", "\nnsc> ")
1619
def shellPromptString = scalaPropOrElse("shell.prompt", "%nscala> ")
20+
def shellWelcomeString = scalaPropOrElse("shell.welcome",
21+
"""Welcome to Scala %1$#s (%3$s, Java %2$s).
22+
|Type in expressions for evaluation. Or try :help.""".stripMargin
23+
)
24+
1725
// message to display at EOF (which by default ends with
1826
// a newline so as not to break the user's terminal)
1927
def shellInterruptedString = scalaPropOrElse("shell.interrupted", f":quit$lineSeparator")

src/compiler/scala/tools/nsc/ast/TreeGen.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ abstract class TreeGen extends scala.reflect.internal.TreeGen with TreeDSL {
233233
}
234234

235235
/** Return the synchronized part of the double-checked locking idiom around the syncBody tree. It guards with `cond` and
236-
* synchronizez on `clazz.this`. Additional statements can be included after initialization,
236+
* synchronizes on `clazz.this`. Additional statements can be included after initialization,
237237
* (outside the synchronized block).
238238
*
239239
* The idiom works only if the condition is using a volatile field.

src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ trait Opcodes { self: ICodes =>
8686
* Each case subclass will represent a specific operation.
8787
*/
8888
abstract class Instruction extends Cloneable {
89-
// Vlad: I used these for checking the quality of the implementation, and we should regularely run a build with them
89+
// Vlad: I used these for checking the quality of the implementation, and we should regularly run a build with them
9090
// enabled. But for production these should definitely be disabled, unless we enjoy getting angry emails from Greg :)
9191
//if (!this.isInstanceOf[opcodes.LOAD_EXCEPTION])
9292
// assert(consumed == consumedTypes.length)

src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ abstract class BTypes {
648648
* JVMS 4.7.7: the attribute must be present "if and only if it represents a local class
649649
* or an anonymous class" (i.e. not for member classes).
650650
*
651-
* The attribute is mis-named, it should be called "EnclosingClass". It has to be defined for all
651+
* The attribute is misnamed, it should be called "EnclosingClass". It has to be defined for all
652652
* local and anonymous classes, no matter if there is an enclosing method or not. Accordingly, the
653653
* "class" field (see below) must be always defined, while the "method" field may be null.
654654
*
@@ -798,7 +798,7 @@ abstract class BTypes {
798798
* 2. The ClassBType should be built from a classfile, but the class could not be found on the
799799
* compilation classpath.
800800
*
801-
* Note that all ClassBTypes required in a non-optimzied run are built during code generation from
801+
* Note that all ClassBTypes required in a non-optimized run are built during code generation from
802802
* the class symbols referenced by the ASTs, so they have a valid info. Therefore the backend
803803
* often invokes `info.get` (which asserts the info to exist) when reading data from the ClassBType.
804804
*

src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ class BTypesFromSymbols[G <: Global](val global: G) extends BTypes {
355355
// See comment in BTypes, when is a class marked static in the InnerClass table.
356356
val isStaticNestedClass = isOriginallyStaticOwner(innerClassSym.originalOwner)
357357

358-
// After lambdalift (which is where we are), the rawowoner field contains the enclosing class.
358+
// After lambdalift (which is where we are), the rawowner field contains the enclosing class.
359359
val enclosingClass = {
360360
// (1) Example java source: class C { static class D { } }
361361
// The Scala compiler creates a class and a module symbol for C. Because D is a static

src/compiler/scala/tools/nsc/backend/jvm/GenBCode.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ abstract class GenBCode extends BCodeSyncAndTry {
167167
)
168168
}
169169

170+
// shim for SBT, see https://github.com/sbt/sbt/issues/2076
171+
// TODO put this closer to classfile writing once we have closure elimination
172+
// TODO create a nicer public API to find out the correspondence between sourcefile and ultimate classfiles
173+
currentUnit.icode += new icodes.IClass(cd.symbol)
174+
170175
// -------------- mirror class, if needed --------------
171176
val mirrorC =
172177
if (isTopLevelModuleClass(claszSymbol)) {

src/compiler/scala/tools/nsc/reporters/Reporter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class Reporter extends scala.reflect.internal.Reporter {
2020
/** Informational messages. If `!force`, they may be suppressed. */
2121
final def info(pos: Position, msg: String, force: Boolean): Unit = info0(pos, msg, INFO, force)
2222

23-
/** For sending a message which should not be labeled as a warning/error,
23+
/** For sending a message which should not be labelled as a warning/error,
2424
* but also shouldn't require -verbose to be visible.
2525
*/
2626
def echo(msg: String): Unit = info(NoPosition, msg, force = true)

src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ trait MatchWarnings {
4040
}
4141
}
4242

43-
// Issue better warnings than "unreachable code" when people mis-use
43+
// Issue better warnings than "unreachable code" when people misuse
4444
// variable patterns thinking they bind to existing identifiers.
4545
//
4646
// Possible TODO: more deeply nested variable patterns, like

0 commit comments

Comments
 (0)