diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-04-20 14:54:32 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-04-20 14:54:32 +0200 |
commit | 2ec7e7970aea01d86aa2faa4a9d7753ac505c68e (patch) | |
tree | 021e96b5b9d9df83a9eaf1877465686380dd03f7 /src/library | |
parent | 4f2a20e843c0f07352dff87767cad13636942a3e (diff) | |
parent | c600c15488b97e7b1f72e6b7811f53f03a493c1c (diff) | |
download | scala-2ec7e7970aea01d86aa2faa4a9d7753ac505c68e.tar.gz scala-2ec7e7970aea01d86aa2faa4a9d7753ac505c68e.tar.bz2 scala-2ec7e7970aea01d86aa2faa4a9d7753ac505c68e.zip |
Merge pull request #5100 from lrytz/unitBox
SI-6710 / PR 5072 follow-up: fix Unit.box / Unit.unbox
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/Unit.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/Unit.scala b/src/library/scala/Unit.scala index 397d7b823b..eb6d1d0ddf 100644 --- a/src/library/scala/Unit.scala +++ b/src/library/scala/Unit.scala @@ -30,7 +30,7 @@ object Unit extends AnyValCompanion { * @param x the Unit to be boxed * @return a scala.runtime.BoxedUnit offering `x` as its underlying value. */ - def box(x: Unit): scala.runtime.BoxedUnit = ??? + def box(x: Unit): scala.runtime.BoxedUnit = scala.runtime.BoxedUnit.UNIT /** Transform a boxed type into a value type. Note that this * method is not typesafe: it accepts any Object, but will throw @@ -40,7 +40,7 @@ object Unit extends AnyValCompanion { * @throws ClassCastException if the argument is not a scala.runtime.BoxedUnit * @return the Unit value () */ - def unbox(x: java.lang.Object): Unit = ??? + def unbox(x: java.lang.Object): Unit = x.asInstanceOf[scala.runtime.BoxedUnit] /** The String representation of the scala.Unit companion object. */ override def toString = "object scala.Unit" |