diff options
Diffstat (limited to 'src/compiler')
16 files changed, 25 insertions, 25 deletions
diff --git a/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala b/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala index 45f8d1af5f..b9e9a14adf 100644 --- a/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala +++ b/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala @@ -40,6 +40,6 @@ class GenericRunnerSettings(error: String => Unit) extends Settings(error) { "-nc", "do not use the fsc compilation daemon") withAbbreviation "-nocompdaemon" - @deprecated("Use `nc` instead") def nocompdaemon = nc - @deprecated("Use `save` instead") def savecompiled = save + @deprecated("Use `nc` instead", "2.9.0") def nocompdaemon = nc + @deprecated("Use `save` instead", "2.9.0") def savecompiled = save } diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala index ad39ee2b26..434f19f21b 100644 --- a/src/compiler/scala/tools/nsc/Interpreter.scala +++ b/src/compiler/scala/tools/nsc/Interpreter.scala @@ -5,7 +5,7 @@ import java.io._ /** A compatibility stub. */ -@deprecated("Use a class in the scala.tools.nsc.interpreter package.") +@deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0") class Interpreter(settings: Settings, out: PrintWriter) extends IMain(settings, out) { def this(settings: Settings) = this(settings, new NewLinePrintWriter(new ConsoleWriter, true)) def this() = this(new Settings()) diff --git a/src/compiler/scala/tools/nsc/InterpreterCommand.scala b/src/compiler/scala/tools/nsc/InterpreterCommand.scala index ae2530ce40..e25a83e08b 100644 --- a/src/compiler/scala/tools/nsc/InterpreterCommand.scala +++ b/src/compiler/scala/tools/nsc/InterpreterCommand.scala @@ -4,5 +4,5 @@ import interpreter._ /** A compatibility stub. */ -@deprecated("Use a class in the scala.tools.nsc.interpreter package.") +@deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0") class InterpreterCommand(arguments: List[String], error: String => Unit) extends CommandLine(arguments, error) { }
\ No newline at end of file diff --git a/src/compiler/scala/tools/nsc/InterpreterLoop.scala b/src/compiler/scala/tools/nsc/InterpreterLoop.scala index 8eb381f18a..a0be3f4fdb 100644 --- a/src/compiler/scala/tools/nsc/InterpreterLoop.scala +++ b/src/compiler/scala/tools/nsc/InterpreterLoop.scala @@ -5,7 +5,7 @@ import java.io._ /** A compatibility stub. */ -@deprecated("Use a class in the scala.tools.nsc.interpreter package.") +@deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0") class InterpreterLoop(in0: Option[BufferedReader], out: PrintWriter) extends ILoop(in0, out) { def this(in0: BufferedReader, out: PrintWriter) = this(Some(in0), out) def this() = this(None, new PrintWriter(scala.Console.out)) diff --git a/src/compiler/scala/tools/nsc/MainInterpreter.scala b/src/compiler/scala/tools/nsc/MainInterpreter.scala index 9055466dd7..5d190bbe14 100644 --- a/src/compiler/scala/tools/nsc/MainInterpreter.scala +++ b/src/compiler/scala/tools/nsc/MainInterpreter.scala @@ -7,7 +7,7 @@ package scala.tools.nsc import interpreter._ -@deprecated("Use a class in the scala.tools.nsc.interpreter package.") +@deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0") object MainInterpreter { def main(args: Array[String]): Unit = new ILoop main args } diff --git a/src/compiler/scala/tools/nsc/ast/DocComments.scala b/src/compiler/scala/tools/nsc/ast/DocComments.scala index 9df0069ada..5d276e2004 100755 --- a/src/compiler/scala/tools/nsc/ast/DocComments.scala +++ b/src/compiler/scala/tools/nsc/ast/DocComments.scala @@ -301,7 +301,7 @@ trait DocComments { self: SymbolTable => val defines = sections filter { startsWithTag(raw, _, "@define") } val usecases = sections filter { startsWithTag(raw, _, "@usecase") } - val end = startTag(raw, (defines ::: usecases).sort(_._1 < _._1)) + val end = startTag(raw, (defines ::: usecases).sortBy(_._1)) (if (end == raw.length - 2) raw else raw.substring(0, end) + "*/", defines map { case (start, end) => raw.substring(start, end) }, diff --git a/src/compiler/scala/tools/nsc/doc/model/Entity.scala b/src/compiler/scala/tools/nsc/doc/model/Entity.scala index 4fb0341684..86de011e68 100644 --- a/src/compiler/scala/tools/nsc/doc/model/Entity.scala +++ b/src/compiler/scala/tools/nsc/doc/model/Entity.scala @@ -127,7 +127,7 @@ trait MemberEntity extends Entity { /** Some deprecation message if this member is deprecated, or none otherwise. */ def deprecation: Option[Body] - @deprecated("Use `inDefinitionTemplates` instead") + @deprecated("Use `inDefinitionTemplates` instead", "2.9.0") def inheritedFrom: List[TemplateEntity] /** For members representing values: the type of the value returned by this member; for members @@ -204,7 +204,7 @@ trait DocTemplateEntity extends TemplateEntity with MemberEntity { /** The direct super-type of this template. */ def parentType: Option[TypeEntity] - @deprecated("Use `linearizationTemplates` and `linearizationTypes` instead") + @deprecated("Use `linearizationTemplates` and `linearizationTypes` instead", "2.9.0") def linearization: List[(TemplateEntity, TypeEntity)] /** All class, trait and object templates which are part of this template's linearization, in lineratization order. diff --git a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala index 40bc89764b..ba15ea8aed 100644 --- a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala +++ b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala @@ -66,11 +66,11 @@ trait CompilerControl { self: Global => * if it does not yet exist create a new one atomically * Note: We want to get roid of this operation as it messes compiler invariants. */ - @deprecated("use getUnitOf(s) or onUnitOf(s) instead") + @deprecated("use getUnitOf(s) or onUnitOf(s) instead", "2.9.0") def unitOf(s: SourceFile): RichCompilationUnit = getOrCreateUnitOf(s) /** The compilation unit corresponding to a position */ - @deprecated("use getUnitOf(pos.source) or onUnitOf(pos.source) instead") + @deprecated("use getUnitOf(pos.source) or onUnitOf(pos.source) instead", "2.9.0") def unitOf(pos: Position): RichCompilationUnit = getOrCreateUnitOf(pos.source) /** Removes the CompilationUnit corresponding to the given SourceFile @@ -211,7 +211,7 @@ trait CompilerControl { self: Global => /** Tells the compile server to shutdown, and not to restart again */ def askShutdown() = scheduler raise ShutdownReq - @deprecated("use parseTree(source) instead") + @deprecated("use parseTree(source) instead", "2.9.0") def askParse(source: SourceFile, response: Response[Tree]) = respond(response) { parseTree(source) } diff --git a/src/compiler/scala/tools/nsc/interpreter/ILoop.scala b/src/compiler/scala/tools/nsc/interpreter/ILoop.scala index d6e447ca0a..fbb3457f4d 100644 --- a/src/compiler/scala/tools/nsc/interpreter/ILoop.scala +++ b/src/compiler/scala/tools/nsc/interpreter/ILoop.scala @@ -51,10 +51,10 @@ class ILoop(in0: Option[BufferedReader], protected val out: PrintWriter) // TODO // object opt extends AestheticSettings // - @deprecated("Use `intp` instead.") + @deprecated("Use `intp` instead.", "2.9.0") def interpreter = intp - @deprecated("Use `intp` instead.") + @deprecated("Use `intp` instead.", "2.9.0") def interpreter_= (i: Interpreter): Unit = intp = i def history = in.history @@ -835,14 +835,14 @@ class ILoop(in0: Option[BufferedReader], protected val out: PrintWriter) } } - @deprecated("Use `process` instead") + @deprecated("Use `process` instead", "2.9.0") def main(args: Array[String]): Unit = { if (isReplDebug) System.out.println(new java.util.Date) process(args) } - @deprecated("Use `process` instead") + @deprecated("Use `process` instead", "2.9.0") def main(settings: Settings): Unit = process(settings) } diff --git a/src/compiler/scala/tools/nsc/interpreter/IMain.scala b/src/compiler/scala/tools/nsc/interpreter/IMain.scala index 62e781958f..2eeefbefce 100644 --- a/src/compiler/scala/tools/nsc/interpreter/IMain.scala +++ b/src/compiler/scala/tools/nsc/interpreter/IMain.scala @@ -162,7 +162,7 @@ class IMain(val settings: Settings, protected val out: PrintWriter) extends Impo if (_isInitialized()) _compiler else null } - @deprecated("Use `global` for access to the compiler instance.") + @deprecated("Use `global` for access to the compiler instance.", "2.9.0") lazy val compiler: global.type = global import global._ diff --git a/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala b/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala index edade4da1b..55706f4fd2 100644 --- a/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala +++ b/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala @@ -52,7 +52,7 @@ object InteractiveReader { } def apply(): InteractiveReader = SimpleReader() - @deprecated("Use `apply` instead.") + @deprecated("Use `apply` instead.", "2.9.0") def createDefault(): InteractiveReader = apply() } diff --git a/src/compiler/scala/tools/nsc/package.scala b/src/compiler/scala/tools/nsc/package.scala index 79ced4f05a..9b9cfe7280 100644 --- a/src/compiler/scala/tools/nsc/package.scala +++ b/src/compiler/scala/tools/nsc/package.scala @@ -6,8 +6,8 @@ package scala.tools package object nsc { - @deprecated("Use a class in the scala.tools.nsc.interpreter package.") + @deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0") type InterpreterSettings = interpreter.ISettings - @deprecated("Use a class in the scala.tools.nsc.interpreter package.") + @deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0") val InterpreterResults = interpreter.Results }
\ No newline at end of file diff --git a/src/compiler/scala/tools/nsc/symtab/Names.scala b/src/compiler/scala/tools/nsc/symtab/Names.scala index a046058faf..7eccb9a49f 100644 --- a/src/compiler/scala/tools/nsc/symtab/Names.scala +++ b/src/compiler/scala/tools/nsc/symtab/Names.scala @@ -120,7 +120,7 @@ trait Names extends reflect.generic.Names { def isTypeName(name: Name): Boolean = name.isTypeName def nameChars: Array[Char] = chrs - @deprecated("") def view(s: String): TermName = newTermName(s) + @deprecated("", "2.9.0") def view(s: String): TermName = newTermName(s) // Classes ---------------------------------------------------------------------- diff --git a/src/compiler/scala/tools/nsc/util/FreshNameCreator.scala b/src/compiler/scala/tools/nsc/util/FreshNameCreator.scala index 086de23e90..998e1694cc 100644 --- a/src/compiler/scala/tools/nsc/util/FreshNameCreator.scala +++ b/src/compiler/scala/tools/nsc/util/FreshNameCreator.scala @@ -15,9 +15,9 @@ trait FreshNameCreator { def newName(): String def newName(prefix: String): String - @deprecated("use newName(prefix)") + @deprecated("use newName(prefix)", "2.9.0") def newName(pos: util.Position, prefix: String): String = newName(prefix) - @deprecated("use newName()") + @deprecated("use newName()", "2.9.0") def newName(pos: util.Position): String = newName() } diff --git a/src/compiler/scala/tools/nsc/util/Position.scala b/src/compiler/scala/tools/nsc/util/Position.scala index d296f45aed..49e9c12eb4 100644 --- a/src/compiler/scala/tools/nsc/util/Position.scala +++ b/src/compiler/scala/tools/nsc/util/Position.scala @@ -96,7 +96,7 @@ trait Position { /** The end of the position's range, or point if not a range position */ def endOrPoint: Int = point - @deprecated("use point instead") + @deprecated("use point instead", "2.9.0") def offset: Option[Int] = if (isDefined) Some(point) else None /** The same position with a different start value (if a range) */ diff --git a/src/compiler/scala/tools/nsc/util/Set.scala b/src/compiler/scala/tools/nsc/util/Set.scala index 108956321c..2bc2526b16 100644 --- a/src/compiler/scala/tools/nsc/util/Set.scala +++ b/src/compiler/scala/tools/nsc/util/Set.scala @@ -20,7 +20,7 @@ abstract class Set[T <: AnyRef] { def apply(x: T): Boolean = contains(x) - @deprecated("use `iterator' instead") def elements = iterator + @deprecated("use `iterator' instead", "2.9.0") def elements = iterator def contains(x: T): Boolean = findEntry(x) ne null |