diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-06-03 11:08:50 -0700 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-06-03 11:08:50 -0700 |
commit | 69887ddd682057c4787e2e4377830390faf8ecf1 (patch) | |
tree | 1158f24dd50dac397e867a6d2d861171e7335c4f /src/library | |
parent | c1cd65bb5276b715141df6d09fc95b0c44d2b4c2 (diff) | |
parent | 82f0925b69db8b5f9a3b10f58926c574433ca423 (diff) | |
download | scala-69887ddd682057c4787e2e4377830390faf8ecf1.tar.gz scala-69887ddd682057c4787e2e4377830390faf8ecf1.tar.bz2 scala-69887ddd682057c4787e2e4377830390faf8ecf1.zip |
Merge pull request #2577 from scalamacros/pullrequest/paradise
Backport from paradise/macros
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/StringContext.scala | 2 | ||||
-rw-r--r-- | src/library/scala/reflect/package.scala | 2 | ||||
-rw-r--r-- | src/library/scala/runtime/ScalaRunTime.scala | 13 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/library/scala/StringContext.scala b/src/library/scala/StringContext.scala index 1b5fd6c8d3..42fb2f36e8 100644 --- a/src/library/scala/StringContext.scala +++ b/src/library/scala/StringContext.scala @@ -162,7 +162,7 @@ case class StringContext(parts: String*) { */ // The implementation is hardwired to `scala.tools.reflect.MacroImplementations.macro_StringInterpolation_f` // Using the mechanism implemented in `scala.tools.reflect.FastTrack` - def f(args: Any*): String = ??? // macro + def f(args: Any*): String = macro ??? } object StringContext { diff --git a/src/library/scala/reflect/package.scala b/src/library/scala/reflect/package.scala index 97d7da3f2d..74c1f2172c 100644 --- a/src/library/scala/reflect/package.scala +++ b/src/library/scala/reflect/package.scala @@ -60,7 +60,7 @@ package object reflect { // implementation is hardwired into `scala.reflect.reify.Taggers` // using the mechanism implemented in `scala.tools.reflect.FastTrack` // todo. once we have implicit macros for tag generation, we can remove this anchor - private[scala] def materializeClassTag[T](): ClassTag[T] = ??? // macro + private[scala] def materializeClassTag[T](): ClassTag[T] = macro ??? @deprecated("Use `@scala.beans.BeanDescription` instead", "2.10.0") type BeanDescription = scala.beans.BeanDescription diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index ea1f392e2b..3a85207235 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -350,4 +350,17 @@ object ScalaRunTime { } } } + + def box[T](clazz: jClass[T]): jClass[_] = clazz match { + case java.lang.Byte.TYPE => classOf[java.lang.Byte] + case java.lang.Short.TYPE => classOf[java.lang.Short] + case java.lang.Character.TYPE => classOf[java.lang.Character] + case java.lang.Integer.TYPE => classOf[java.lang.Integer] + case java.lang.Long.TYPE => classOf[java.lang.Long] + case java.lang.Float.TYPE => classOf[java.lang.Float] + case java.lang.Double.TYPE => classOf[java.lang.Double] + case java.lang.Void.TYPE => classOf[scala.runtime.BoxedUnit] + case java.lang.Boolean.TYPE => classOf[java.lang.Boolean] + case _ => clazz + } } |