diff options
author | Sébastien Doeraene <sjrdoeraene@gmail.com> | 2016-04-13 13:05:39 +0200 |
---|---|---|
committer | Sébastien Doeraene <sjrdoeraene@gmail.com> | 2016-04-13 16:20:46 +0200 |
commit | 950f6df06ef122cc6b71a4b402b1b22d9e5376dc (patch) | |
tree | b76bf4b769f6e0afa16791a1c84a8cd45d5cd675 /src | |
parent | 6090f53ee9ab2677f732ea5cc7144cb9684b2593 (diff) | |
download | scala-950f6df06ef122cc6b71a4b402b1b22d9e5376dc.tar.gz scala-950f6df06ef122cc6b71a4b402b1b22d9e5376dc.tar.bz2 scala-950f6df06ef122cc6b71a4b402b1b22d9e5376dc.zip |
Hide ScalaRunTime.isTuple inside stringOf.
Because it is otherwise unused.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/runtime/ScalaRunTime.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index 9a2c917ae2..dd973d12da 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -31,8 +31,6 @@ object ScalaRunTime { def isValueClass(clazz: jClass[_]) = clazz.isPrimitive() - // includes specialized subclasses and future proofed against hypothetical TupleN (for N > 22) - def isTuple(x: Any) = x != null && x.getClass.getName.startsWith("scala.Tuple") def isAnyVal(x: Any) = x match { case _: Byte | _: Short | _: Char | _: Int | _: Long | _: Float | _: Double | _: Boolean | _: Unit => true case _ => false @@ -227,6 +225,9 @@ object ScalaRunTime { def isScalaClass(x: AnyRef) = packageOf(x) startsWith "scala." def isScalaCompilerClass(x: AnyRef) = packageOf(x) startsWith "scala.tools.nsc." + // includes specialized subclasses and future proofed against hypothetical TupleN (for N > 22) + def isTuple(x: Any) = x != null && x.getClass.getName.startsWith("scala.Tuple") + // We use reflection because the scala.xml package might not be available def isSubClassOf(potentialSubClass: Class[_], ofClass: String) = try { |