diff options
Diffstat (limited to 'src')
7 files changed, 18 insertions, 15 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/opt/ConstantOptimization.scala b/src/compiler/scala/tools/nsc/backend/opt/ConstantOptimization.scala index a7ce7dfa04..eafaf41932 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/ConstantOptimization.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/ConstantOptimization.scala @@ -539,14 +539,14 @@ abstract class ConstantOptimization extends SubComponent { // number of instructions excluding the last one val normalCount = block.size - 1 - val exceptionState = in.cleanStack + var exceptionState = in.cleanStack var normalExitState = in var idx = 0 while (idx < normalCount) { val inst = block(idx) normalExitState = interpretInst(normalExitState, inst) if (normalExitState.locals ne exceptionState.locals) - exceptionState.copy(locals = exceptionState mergeLocals normalExitState.locals) + exceptionState = exceptionState.copy(locals = exceptionState mergeLocals normalExitState.locals) idx += 1 } diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 9f7bdf7aff..c188c326c3 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -1254,7 +1254,6 @@ trait Infer extends Checkable { def isFreeTypeParamOfTerm(sym: Symbol) = ( sym.isAbstractType && sym.owner.isTerm - && !sym.info.bounds.exists(_.typeParams.nonEmpty) ) // Intentionally *not* using `Type#typeSymbol` here, which would normalize `tp` diff --git a/src/library/scala/collection/immutable/StringLike.scala b/src/library/scala/collection/immutable/StringLike.scala index 1b52e40b72..232d67df4f 100644 --- a/src/library/scala/collection/immutable/StringLike.scala +++ b/src/library/scala/collection/immutable/StringLike.scala @@ -137,6 +137,7 @@ self => /** Returns this string with first character converted to upper case. * If the first character of the string is capitalized, it is returned unchanged. + * This method does not convert characters outside the Basic Multilingual Plane (BMP). */ def capitalize: String = if (toString == null) null diff --git a/src/library/scala/sys/process/ProcessBuilder.scala b/src/library/scala/sys/process/ProcessBuilder.scala index ac86495001..e4344a857e 100644 --- a/src/library/scala/sys/process/ProcessBuilder.scala +++ b/src/library/scala/sys/process/ProcessBuilder.scala @@ -90,19 +90,19 @@ import ProcessBuilder._ * * If not specified, the input of the external commands executed with `run` or * `!` will not be tied to anything, and the output will be redirected to the - * stdout and stderr of the Scala process. For the methods `!!` and `lines`, no + * stdout and stderr of the Scala process. For the methods `!!` and `lineStream`, no * input will be provided, and the output will be directed according to the * semantics of these methods. * * Some methods will cause stdin to be used as input. Output can be controlled - * with a [[scala.sys.process.ProcessLogger]] -- `!!` and `lines` will only + * with a [[scala.sys.process.ProcessLogger]] -- `!!` and `lineStream` will only * redirect error output when passed a `ProcessLogger`. If one desires full * control over input and output, then a [[scala.sys.process.ProcessIO]] can be * used with `run`. * - * For example, we could silence the error output from `lines_!` like this: + * For example, we could silence the error output from `lineStream_!` like this: * {{{ - * val etcFiles = "find /etc" lines_! ProcessLogger(line => ()) + * val etcFiles = "find /etc" lineStream_! ProcessLogger(line => ()) * }}} * * ==Extended Example== diff --git a/src/library/scala/sys/process/package.scala b/src/library/scala/sys/process/package.scala index 445c3aee60..ac6ab8f670 100644 --- a/src/library/scala/sys/process/package.scala +++ b/src/library/scala/sys/process/package.scala @@ -25,7 +25,7 @@ package scala.sys { * * {{{ * import scala.sys.process._ - * "ls" #| "grep .scala" #&& Seq("sh", "-c", "scalac *.scala") #|| "echo nothing found" lines + * "ls" #| "grep .scala" #&& Seq("sh", "-c", "scalac *.scala") #|| "echo nothing found" lineStream * }}} * * We describe below the general concepts and architecture of the package, @@ -92,7 +92,7 @@ package scala.sys { * * - Return status of the process (`!` methods) * - Output of the process as a `String` (`!!` methods) - * - Continuous output of the process as a `Stream[String]` (`lines` methods) + * - Continuous output of the process as a `Stream[String]` (`lineStream` methods) * - The `Process` representing it (`run` methods) * * Some simple examples of these methods: @@ -109,7 +109,7 @@ package scala.sys { * // a Stream[String] * def sourceFilesAt(baseDir: String): Stream[String] = { * val cmd = Seq("find", baseDir, "-name", "*.scala", "-type", "f") - * cmd.lines + * cmd.lineStream * } * }}} * @@ -167,8 +167,8 @@ package scala.sys { * def sourceFilesAt(baseDir: String): (Stream[String], StringBuffer) = { * val buffer = new StringBuffer() * val cmd = Seq("find", baseDir, "-name", "*.scala", "-type", "f") - * val lines = cmd lines_! ProcessLogger(buffer append _) - * (lines, buffer) + * val lineStream = cmd lineStream_! ProcessLogger(buffer append _) + * (lineStream, buffer) * } * }}} * diff --git a/src/reflect/scala/reflect/internal/TypeDebugging.scala b/src/reflect/scala/reflect/internal/TypeDebugging.scala index 63f897cd32..4a5128feeb 100644 --- a/src/reflect/scala/reflect/internal/TypeDebugging.scala +++ b/src/reflect/scala/reflect/internal/TypeDebugging.scala @@ -110,7 +110,7 @@ trait TypeDebugging { val hi_s = if (noPrint(hi)) "" else " <: " + ptTree(hi) lo_s + hi_s case _ if (t.symbol eq null) || (t.symbol eq NoSymbol) => to_s(t) - case _ => "" + t.symbol.tpe + case _ => if (t.symbol.hasCompleteInfo) "" + t.symbol.tpe else "<?>" } def ptTypeParam(td: TypeDef): String = { val TypeDef(_, name, tparams, rhs) = td diff --git a/src/repl-jline/scala/tools/nsc/interpreter/jline/JLineReader.scala b/src/repl-jline/scala/tools/nsc/interpreter/jline/JLineReader.scala index b5db4c2098..0983f24fbb 100644 --- a/src/repl-jline/scala/tools/nsc/interpreter/jline/JLineReader.scala +++ b/src/repl-jline/scala/tools/nsc/interpreter/jline/JLineReader.scala @@ -33,11 +33,14 @@ class InteractiveReader(completer: () => Completion) extends interpreter.Interac private val consoleReader = { val reader = new JLineConsoleReader() - reader setPaginationEnabled interpreter.`package`.isPaged + reader setPaginationEnabled interpreter.isPaged - // ASAP + // turn off magic ! reader setExpandEvents false + // enable detecting pasted tab char (when next char is immediately available) which is taken raw, not completion + reader setCopyPasteDetection true + reader setHistory history.asInstanceOf[JHistory] reader |