summaryrefslogtreecommitdiff
path: root/src/library/scala/Predef.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/Predef.scala')
-rw-r--r--src/library/scala/Predef.scala10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala
index 700b5bfbac..8881cd1fbe 100644
--- a/src/library/scala/Predef.scala
+++ b/src/library/scala/Predef.scala
@@ -56,7 +56,7 @@ object Predef extends LowPriorityImplicits {
def implicitly[T](implicit e: T) = e // for summoning implicit values from the nether world
@inline def locally[T](x: T): T = x // to communicate intent and avoid unmoored statements
- // errors and asserts -------------------------------------------------
+ // Deprecated
@deprecated("Use system.error(message) instead")
def error(message: String): Nothing = system.error(message)
@@ -67,6 +67,11 @@ object Predef extends LowPriorityImplicits {
@deprecated("Use system.exit(status) instead")
def exit(status: Int): Nothing = system.exit(status)
+ @deprecated("Use formatString.format(args: _*) or arg.formatted(formatString) instead")
+ def format(text: String, xs: Any*) = augmentString(text).format(xs: _*)
+
+ // errors and asserts -------------------------------------------------
+
/** Tests an expression, throwing an AssertionError if false.
* Calls to this method will not be generated if -Xelide-below
* is at least ASSERTION.
@@ -183,9 +188,6 @@ object Predef extends LowPriorityImplicits {
def println(x: Any) = Console.println(x)
def printf(text: String, xs: Any*) = Console.print(text.format(xs: _*))
- @deprecated("Use formatString.format(args: _*) or arg.formatted(formatString) instead")
- def format(text: String, xs: Any*) = augmentString(text).format(xs: _*)
-
def readLine(): String = Console.readLine()
def readLine(text: String, args: Any*) = Console.readLine(text, args)
def readBoolean() = Console.readBoolean()