diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-10-03 23:24:03 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-10-03 23:55:53 +0200 |
commit | 9930b559fe657d517abeb3e4e4ffb3a2a6e00ee0 (patch) | |
tree | 820e2fcd9957dd03c3e5d047b01f9daa4926562f /test/files/run | |
parent | cd847070254a2c6055e543c65ec82ea8429ee757 (diff) | |
download | scala-9930b559fe657d517abeb3e4e4ffb3a2a6e00ee0.tar.gz scala-9930b559fe657d517abeb3e4e4ffb3a2a6e00ee0.tar.bz2 scala-9930b559fe657d517abeb3e4e4ffb3a2a6e00ee0.zip |
turns on documentation of scala.reflect.runtime
We definitely need to document scala.reflect.runtime.universe,
therefore adding scala.reflect.runtime to skipPackages was a mistake.
But then we need to make a bunch of internal classes private to reflect
or to scala. Not very pretty, but it works.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/reflection-magicsymbols-invoke.scala | 8 | ||||
-rw-r--r-- | test/files/run/reflection-valueclasses-magic.scala | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/test/files/run/reflection-magicsymbols-invoke.scala b/test/files/run/reflection-magicsymbols-invoke.scala index b38d1be7b2..5f39370708 100644 --- a/test/files/run/reflection-magicsymbols-invoke.scala +++ b/test/files/run/reflection-magicsymbols-invoke.scala @@ -2,6 +2,12 @@ import scala.reflect.runtime.universe._ import scala.reflect.runtime.universe.definitions._ import scala.reflect.runtime.{currentMirror => cm} +package scala { + object ExceptionUtils { + def unwrapThrowable(ex: Throwable): Throwable = scala.reflect.runtime.ReflectionUtils.unwrapThrowable(ex) + } +} + object Test extends App { def key(sym: Symbol) = sym + ": " + sym.typeSignature def test(tpe: Type, receiver: Any, method: String, args: Any*) { @@ -13,7 +19,7 @@ object Test extends App { println(result) } catch { case ex: Throwable => - val realex = scala.reflect.runtime.ReflectionUtils.unwrapThrowable(ex) + val realex = scala.ExceptionUtils.unwrapThrowable(ex) println(realex.getClass + ": " + realex.getMessage) } print(s"testing ${tpe.typeSymbol.name}.$method: ") diff --git a/test/files/run/reflection-valueclasses-magic.scala b/test/files/run/reflection-valueclasses-magic.scala index f9feb2d504..577939d2db 100644 --- a/test/files/run/reflection-valueclasses-magic.scala +++ b/test/files/run/reflection-valueclasses-magic.scala @@ -3,6 +3,12 @@ import scala.reflect.runtime.universe.definitions._ import scala.reflect.runtime.{currentMirror => cm} import scala.reflect.ClassTag +package scala { + object ExceptionUtils { + def unwrapThrowable(ex: Throwable): Throwable = scala.reflect.runtime.ReflectionUtils.unwrapThrowable(ex) + } +} + object Test extends App { def key(sym: Symbol) = { sym match { @@ -35,7 +41,7 @@ object Test extends App { println(s"[${result.getClass}] =======> $result") } catch { case ex: Throwable => - val realex = scala.reflect.runtime.ReflectionUtils.unwrapThrowable(ex) + val realex = scala.ExceptionUtils.unwrapThrowable(ex) println(realex.getClass + ": " + realex.getMessage) } val meth = tpe.declaration(newTermName(method).encodedName.toTermName) |